Integrated: 8341295: Add some useful debugging APIs to the debug agent

Chris Plummer cjplummer at openjdk.org
Fri Oct 4 21:19:51 UTC 2024


On Tue, 1 Oct 2024 21:58:31 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> 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. 
> 
> Tested by running all debugging tests on all supported platforms, and also running tier2, tier3, and tier5 svc ci test tasks.

This pull request has now been integrated.

Changeset: 33e4bfdf
Author:    Chris Plummer <cjplummer at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/33e4bfdf919c44bebcf122818ab92deeb1f1cdce
Stats:     188 lines in 2 files changed: 188 ins; 0 del; 0 mod

8341295: Add some useful debugging APIs to the debug agent

Reviewed-by: amenkov, sspitsyn

-------------

PR: https://git.openjdk.org/jdk/pull/21299


More information about the serviceability-dev mailing list