RFR: 8307478: Implementation of Prepare to Restrict The Dynamic Loading of Agents [v8]

Alan Bateman alanb at openjdk.org
Thu Jun 1 12:37:20 UTC 2023


> This is the implementation for JEP 451. There are two parts to this:
> 
> 1. A multi-line warning is printed when a JVM TI or Java agent is loaded into a running VM. For JVM TI, the message is printed to stderr from JvmtiAgent::load. For Java agents, it is printed to System.err (as that may be redirected) in the JPLIS (j.l.instrumentation) implementation. This part includes an update to the JVM TI spec and API docs to require the warning.
> 
> 2. If running with -Djdk.instrument.traceUsage or -Djdk.instrument.traceUsage=true, the calls to the Instrumentation API print a trace message and stack trace.
> 
> Testing: tier1-6

Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 19 additional commits since the last revision:

 - Split is_loaded, typos in comments
 - Merge
 - Add impl note to document the XX option
 - Cleanup
 - Merge
 - Allow for warning to be skipped when same agent loaded a second/subsequent time
 - Merge
 - Tweak javadoc, update test to use more test infra
 - Merge
 - Merge
 - ... and 9 more: https://git.openjdk.org/jdk/compare/eb72f87a...cbd9bb1d

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13899/files
  - new: https://git.openjdk.org/jdk/pull/13899/files/2d9d5922..cbd9bb1d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13899&range=07
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13899&range=06-07

  Stats: 2137 lines in 162 files changed: 788 ins; 840 del; 509 mod
  Patch: https://git.openjdk.org/jdk/pull/13899.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13899/head:pull/13899

PR: https://git.openjdk.org/jdk/pull/13899


More information about the serviceability-dev mailing list