The following APIs are useful when debugging the debug agent. Calls to them can be added to the code as needed (temporarily) to aid in debugging issues. They were taken from test/lib/jdk/test/lib/jvmti/jvmti_common.hpp and modified to better fit the needs and coding style of the debug agent.
char* translateThreadState(jint flags);
char* getThreadName(jthread thread);
char* getMethodName(jmethodID method);
void printStackTrace(jthread thread);
void printThreadInfo(jthread thread);
I made use of them while working on a couple of recent bugs and found them very useful.
char* translateThreadState(jint flags);
char* getThreadName(jthread thread);
char* getMethodName(jmethodID method);
void printStackTrace(jthread thread);
void printThreadInfo(jthread thread);
I made use of them while working on a couple of recent bugs and found them very useful.
- links to
-
Commit(master) openjdk/jdk/33e4bfdf
-
Review(master) openjdk/jdk/21299