RFR: 8310661: JFR: Replace JVM.getJVM() with JVM

Erik Gahlin egahlin at openjdk.org
Fri Jun 30 12:13:14 UTC 2023


Could I have a review of a change that makes instance methods in the JVM class static. 

Today some methods are static, others are not, which means the JVM object needs to be stored and passed around. A singleton object may have made sense in JDK 8 so JVM::getJVM() could be made caller sensitive, similar to Unsafe::getUnsafe(), but not anymore. The jdk.jfr.internal package is protected by the module system. 

Testing: jdk/jdk/jfr tier1 + tier2

Thanks
Erik

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

Commit messages:
 - Initial

Changes: https://git.openjdk.org/jdk/pull/14713/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14713&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8310661
  Stats: 406 lines in 36 files changed: 25 ins; 72 del; 309 mod
  Patch: https://git.openjdk.org/jdk/pull/14713.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14713/head:pull/14713

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


More information about the hotspot-jfr-dev mailing list