RFR: 8332488: Add JVMTI DataDumpRequest to the debug agent [v5]
Chris Plummer
cjplummer at openjdk.org
Mon Aug 12 21:35:49 UTC 2024
> JVMTI has a somewhat unique event called DataDumpRequest. One way it is triggered is via the JVMTI.data_dump jcmd, which causes JVMTI to send the DataDumpRequest event to all agents that have registered for the event callback. The agent is free to do pretty much what it wants during the callback, but the normal usage is to dump anything that might be useful for debugging the agent. In the case of the debug agent, it could dump internal data like the list of known threads and event handlers. After ranked monitor support is complete, it can also dump the state of all jvmti raw monitors that the debug agent uses.
>
> I decided to not enable this feature by default, and not make public the option to enable it. This should only be used by developers working on the debug agent, or by users when requested to do so (by debug agent developers) to help debug a debug agent problem.
>
> Most of the code executed during the data dump was only available for debug builds, so I've made it available for all builds. Their addition does not affect product builds except for adding a small footprint.
>
> TBD is directing the output to a file. This is useful for some of the debugger tests that don't include the debuggee output in the log. This seems to be the case for most com/sun/jdi tests. I decided not to include it for this first pass since it is rather disruptive and detracts from the main changes being made.
>
> testing tbd: run all tier1, tier2, and. tie5 svc tests.
Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
git rid of unnecessary @build
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20367/files
- new: https://git.openjdk.org/jdk/pull/20367/files/34937aa0..e68e0eca
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20367&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20367&range=03-04
Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/20367.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20367/head:pull/20367
PR: https://git.openjdk.org/jdk/pull/20367
More information about the serviceability-dev
mailing list