RFR: 9999: Automatically open base module for accessing Unsafe on JDK 11+

Gunnar Morling github.com+28612+gunnarmorling at openjdk.java.net
Mon Nov 2 07:39:58 UTC 2020


So here's a fresh take on the `Unsafe` / `add-opens` issue for JMC Agent. This still is using `Unsafe`, but I'm using the instrumentation API for opening up the base module within the agent itself, instead of requiring the user to do so. Ideally, we'd still get away from `Unsafe`, but this make the agent easier to use. This is still a draft, would do some more polishing if you all think it's the right approach. Feedback welcome!

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

Commit messages:
 - 9999: Automatically open base module for accessing Unsafe on JDK 11+

Changes: https://git.openjdk.java.net/jmc/pull/152/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=152&range=00
  Issue: https://bugs.openjdk.java.net/browse/JMC-9999
  Stats: 135 lines in 3 files changed: 125 ins; 0 del; 10 mod
  Patch: https://git.openjdk.java.net/jmc/pull/152.diff
  Fetch: git fetch https://git.openjdk.java.net/jmc pull/152/head:pull/152

PR: https://git.openjdk.java.net/jmc/pull/152


More information about the jmc-dev mailing list