RFR: 8322980: Debug agent's dumpThread() API should update thread's name before printing it
Chris Plummer
cjplummer at openjdk.org
Thu Jan 4 17:24:23 UTC 2024
On Thu, 4 Jan 2024 17:00:20 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
> A future idea could be to have these ifdefs active in the debug JDK build. I wouldn't normally run the debugger from the debug build, but if you wanted this extra info it would be more convenient if it was in the debug JDK bundle.
Possibly DEBUG_THREADNAME should be enabled in debug builds, but I opted not to long ago because of the potential footprint and performance cost. For the `#if 0` code, generally speaking it results in too much output and is really just meant as examples of other things you might want to include in the output, but most cases you would prefer not to have all of it. A possible solution would be to have each line of output controlled by a global variable (either a bitwise flag or a global per line), and then the user could enable additional output at runtime (from within gdb), but I don't feel this is worth the effort.
There aren't any test output concern unless you introduce calls to these API, in which case they are a concern whether or not all the `#if 0` stuff is included.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17259#issuecomment-1877483546
More information about the serviceability-dev
mailing list