Integrated: 8259350: Add some internal debugging APIs to the debug agent

Chris Plummer cjplummer at openjdk.java.net
Thu Jan 14 21:06:04 UTC 2021


On Thu, 7 Jan 2021 04:28:19 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> This PR adds some APIs that are useful when debugging the debug agent. They can be called from gdb or from other parts of the debug agent. They mostly do things like dumping internal data structures that are tedious to dump or iterate over in gdb. I developed them while working on loom and found them useful.
> 
> Note that `dumpThreadList()` and `dumpThread()` are not exported from threadControl.c because the argument types are only visible within threadControl.c.
> 
> I debated whether to bracket all these APIs with `#ifdef DEBUG`. In the end I decided to in order to make it clear they are only meant for debugging purposes. If you temporarily need them with a product build, you can always modify the code to include them. I could be persuaded `#ifdef DEBUG` though.

This pull request has now been integrated.

Changeset: d18d26e8
Author:    Chris Plummer <cjplummer at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/d18d26e8
Stats:     258 lines in 8 files changed: 250 ins; 0 del; 8 mod

8259350: Add some internal debugging APIs to the debug agent

Reviewed-by: sspitsyn, amenkov

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

PR: https://git.openjdk.java.net/jdk/pull/1970


More information about the serviceability-dev mailing list