RFR: 8178784: Revisit changes for making Serviceability Agent attach functionality optional

Jini George jini.george at oracle.com
Thu May 25 12:26:15 UTC 2017

Hi all,

Please review the changes for enabling live debugging (attaching to a 
process) with SA on Alpine Linux.

Webrev: http://cr.openjdk.java.net/~jgeorge/8178784/webrev.00/
Issue: https://bugs.openjdk.java.net/browse/JDK-8178784

The crux of the changes are:

1. To include the functions #ifdef-ed out by INCLUDE_SA_ATTACH, and to 
correct build errors resulting due to the inclusion of these functions.
2. SA on Linux uses the thread_db library for attach debugging. This 
library is not available on Alpine Linux. So instead of relying on 
thread_db, I have made changes to iterate over the list of tasks in the 
/proc/<pid>/task directory to find the list of threads to ptrace attach 
to. This enables the jhsdb commands like threads, jstack etc.


More information about the portola-dev mailing list