RFR: 8272651: G1 heap region info print order changed by JDK-8269914 [v2]

Stefan Johansson sjohanss at openjdk.java.net
Thu Aug 26 10:38:03 UTC 2021


On Wed, 25 Aug 2021 13:00:27 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Stefan Johansson has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   HeapMark needs to be below JFRMark to make sure all GC events are withing start and end event.
>
> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 3045:
> 
>> 3043:   bool concurrent_operation_is_full_mark = false;
>> 3044: 
>> 3045:   // Verification may use the gang workers, so they must be set up before.
> 
> I see (setup of) the amount of gang workers as input to the garbage collection algorithm, i.e. not the algorithm determines the number of threads, but is determined beforehand before doing the collection.
> 
> E.g. see G1YoungCollector::collect() in https://github.com/tschatzl/jdk/commit/7fcfdfad9e01e0ae263dc61c1797281a4d5b192f#diff-da5609c228269aa265489241cdb50e89299e79b8691e0e534abf2823d7de2615

We discussed this as well and compared it with how the `G1FullCollector`handles this and whit this in mind the current proposal is ok. We might want to do more refactoring around this later on, but right now we can see calculating the number of workers as part of the young collector and not only input.

> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 3057:
> 
>> 3055:     // Create the heap printer before internal pause timing to have
>> 3056:     // heap information printed as last part of detailed GC log.
>> 3057:     G1HeapPrinterMark hpm(this);
> 
> This will make this code (and printing) disappear from the "Other" time in pause timing.
> 
> Some of that printing (and data gathering) might be expensive.

Me and Thomas discussed this and we agreed on this being ok. Even if some part of the printing could take a little time it is not important to record it as "other time".

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

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



More information about the hotspot-gc-dev mailing list