RFR: 8299089: Instrument global jni handles with tag to make them distinguishable [v2]

Axel Boldt-Christmas aboldtch at openjdk.org
Tue Jan 10 15:21:29 UTC 2023


> Weak global jni handles are tagged so the GC can distinguish them when resolving the object. Today there is no cheap way of distinguishing global jni handles from local jni handles. For generational ZGC the OopStorage handles and the thread local handles semantical difference requires the handles to be distinguishable. 
> 
> This enhancements instruments the jni handles with a global tag similarly to the jweak tag. 
> 
> Note: 
>  * the s390 implementation has minimal changes and requires improvement.
>  * There is room for enchantment here to create the same abstraction that ppc uses for all platforms, i.e. move the resolve_jobject from the MacroAssembler to the BarrierSetAssembler which allows for more optimised code for GCs that can treat local and global handles the same. 
> 
> Testing: GHA. Oracle supported platforms tier1-3. Will run higher tiers. Has also been tested on the generational branch of ZGC for over three months. Requires testing on non Oracle platforms.

Axel Boldt-Christmas has updated the pull request incrementally with two additional commits since the last revision:

 - update copyright
 - albertnetymk feedback

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11740/files
  - new: https://git.openjdk.org/jdk/pull/11740/files/3629e2e4..f4b8fde1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11740&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11740&range=00-01

  Stats: 105 lines in 35 files changed: 14 ins; 8 del; 83 mod
  Patch: https://git.openjdk.org/jdk/pull/11740.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11740/head:pull/11740

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


More information about the hotspot-dev mailing list