RFR: 8276887: G1: Move precleaning to Concurrent Mark From Roots subphase [v3]

Stefan Johansson sjohanss at openjdk.java.net
Thu Nov 11 13:10:47 UTC 2021


On Wed, 10 Nov 2021 21:09:10 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Simple change of moving the "Preclean" subphase into "Mark from roots" subphase so that precleaning becomes parallel automatically. Evaluation using a contrived java program shows that multiple GC threads do precleaning. More detailed testing results are available in the JBS ticket.
>> 
>> Test: hotspot_gc
>
> Albert Mingkun Yang has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - review
>  - Revert "worker_id"
>    
>    This reverts commit 0841db5c5c2b39372058b6ba0d8027aae3716669.

Nice improvement. I have one suggestion, but feel free to ignore it if you don't agree.

The new logging is on par with the old one, but I think it would be nice to make it more consistent with other reference processing logging. We currently have other logging that look like this for example:

[228,965s][debug][gc,phases,ref  ] GC(38)   SoftReference:
[228,965s][debug][gc,phases,ref  ] GC(38)     Discovered: 0
[228,965s][debug][gc,phases,ref  ] GC(38)     Cleared: 0
[228,965s][debug][gc,phases,ref  ] GC(38)   WeakReference:
[228,965s][debug][gc,phases,ref  ] GC(38)     Discovered: 0
[228,965s][debug][gc,phases,ref  ] GC(38)     Cleared: 0
[228,965s][debug][gc,phases,ref  ] GC(38)   FinalReference:
[228,965s][debug][gc,phases,ref  ] GC(38)     Discovered: 0
[228,965s][debug][gc,phases,ref  ] GC(38)     Cleared: 0
[228,965s][debug][gc,phases,ref  ] GC(38)   PhantomReference:
[228,965s][debug][gc,phases,ref  ] GC(38)     Discovered: 0
[228,965s][debug][gc,phases,ref  ] GC(38)     Cleared: 0


Maybe saying "Precleaned instead of "Cleared". Took a quick look at the ref-printing code and if you feel that this is a good idea but should be as a separate thing I'm good with that as well.

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

PR: https://git.openjdk.java.net/jdk/pull/6327



More information about the hotspot-gc-dev mailing list