JDK-8269419 : G1: Support pinned Ojbect and remove/simplify GCLocker usage in G1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2021-06-26
  • Updated: 2021-06-28
  • Resolved: 2021-06-26
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8269420 :  
JDK-8269421 :  
Description
(
We did not finish the implementation yet, but before go futher we hope to collect any comments such as 
1. the requirement, i.e. is this feature useful?
2. will it be acceptable if the implementation is a little or too complicated? (As we think it's not a very easy work to implement it in G1 currently)
any other comments is welcome, please feel free to comment below. :)
)


Currently, when JNI methods [Get/Release]XxxCritical is called, GCLocker is involved in G1.
GCLocker will block GC, and make the logic a little complicate.
This issue is to track enhancements to support pinned object for G1, and possiblely remove or simplify GCLocker logic in G1.
Comments
Since the answer is a bit longer I took the opportunity to provide it in a blog post: https://tschatzl.github.io/2021/06/28/evacuation-failure.html . I think it covers the topic fairly exhaustively, the information you requested is more to the bottom.
28-06-2021

Thanks Thomas for the prompt response, great to know it's already under implementation. I will close these just created issues as duplicated. I see several issues are related to object pinning per your link above, please kindly let me know if you think any of these issues can be done by me, I'd like to assist. :)
26-06-2021

Hi Hamlin, we already track gc locker related bugs via the gc-g1-pinned-regions label, e.g. https://bugs.openjdk.java.net/issues/?jql=labels%20%3D%20gc-g1-pinned-regions. https://github.com/tschatzl/jdk/tree/full-pin-support contains a full change for g1 (just a little outdated, but nothing serious). There should be some post to hotspot-gc-dev summarizing the situation around the time I created that branch. Please let's move the discussion or questions there. Generally it would be a good idea to ask there first about any efforts already done in that area (or any other) there before starting a "project"... you wouldn't believe what prototypes there already are :) Thanks
26-06-2021