RFR: 8322980: Debug agent's dumpThread() API should update thread's name before printing it [v2]
Chris Plummer
cjplummer at openjdk.org
Fri Jan 5 19:06:34 UTC 2024
> In threadControl.c, at build time you can decide to keep track of thread names by compiling with "#define DEBUG_THREADNAME". If this is also a debug build, some extra debugging functions are included in the build, including "dumpThread(ThreadNode *node)". These are intended to be called from gdb, or possibly from somewhere in the debug agent implementation, to aid with debugging. When dumpThread() prints the thread's name, it just uses the name that was stored when the thread was created. However, the thread name can change, so dumpThread() should really fetch the current thread name and print it.
>
> I also added some commented out code to print other useful fields of the ThreadNode, including the ThreadState. These can be enabled by the user as needed.
>
> Tested with all of tier1, and also ran tier2 and tier4 svc tests.
Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
fix indentation
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17259/files
- new: https://git.openjdk.org/jdk/pull/17259/files/eb318d81..fbbd07e5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17259&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17259&range=00-01
Stats: 18 lines in 1 file changed: 0 ins; 0 del; 18 mod
Patch: https://git.openjdk.org/jdk/pull/17259.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17259/head:pull/17259
PR: https://git.openjdk.org/jdk/pull/17259
More information about the serviceability-dev
mailing list