RFR: 8259350: Add some internal debugging APIs to the debug agent
Chris Plummer
cjplummer at openjdk.java.net
Thu Jan 7 04:33:09 UTC 2021
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 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.
-------------
Commit messages:
- Fix some indentation.
- Add some APIs that are useful when debugging the debug agent.
Changes: https://git.openjdk.java.net/jdk/pull/1970/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1970&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8259350
Stats: 258 lines in 8 files changed: 250 ins; 0 del; 8 mod
Patch: https://git.openjdk.java.net/jdk/pull/1970.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1970/head:pull/1970
PR: https://git.openjdk.java.net/jdk/pull/1970
More information about the serviceability-dev
mailing list