On Thu, 7 Jan 2021 04:28:19 GMT, Chris Plummer <cjplum...@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.

Chris,
It looks good to me.
Thanks,
Serguei

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

Marked as reviewed by sspitsyn (Reviewer).

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

Reply via email to