RFR: 8310661: JFR: Replace JVM.getJVM() with JVM
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
On Thu, 29 Jun 2023 14:57:15 GMT, Erik Gahlin <egahlin@openjdk.org> wrote:
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
Marked as reviewed by mgronlun (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14713#pullrequestreview-1511045370
On Thu, 29 Jun 2023 14:57:15 GMT, Erik Gahlin <egahlin@openjdk.org> wrote:
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
This pull request has now been integrated. Changeset: ba974d5c Author: Erik Gahlin <egahlin@openjdk.org> URL: https://git.openjdk.org/jdk/commit/ba974d5c62c332905b0466b704411a829d6c9ee3 Stats: 406 lines in 36 files changed: 25 ins; 72 del; 309 mod 8310661: JFR: Replace JVM.getJVM() with JVM Reviewed-by: mgronlun ------------- PR: https://git.openjdk.org/jdk/pull/14713
participants (2)
-
Erik Gahlin
-
Markus Grönlund