Prepopulated SerialGC old gen causes slow GC verification

Ioi Lam ioi.lam at oracle.com
Wed Sep 8 20:33:08 UTC 2021



On 9/8/21 12:05 PM, Thomas Schatzl wrote:
> Hi,
>
> On 08.09.21 20:14, Ioi Lam wrote:
>> I am trying to implement JDK-8273508 - Support archived heap objects 
>> in SerialGC
>>
>> https://github.com/openjdk/jdk/compare/master...iklam:8273508-archived-heap-objects-for-serial-gc?expand=1 
>>
>>
>> My initial implementation copies the archived objects into 
>> SerialHeap::old_gen(). However, this causes very slow GC verification:
>
> Maybe the verification does odd things that need a good BOT (that it 
> does not do in young gen)? Just a guess.
>

What is a BOT? :-)

I noticed that after a GC has happened, then the verification would be 
much faster. A GC could be triggered by specifying 
-XX:+VerifyArchivedFields. See  verify_the_heap() in heapShared.cpp.

So can I get a BOT without triggering a GC?

    $ java -XX:+UseSerialGC -Xlog:gc+verify -XX:+VerifyArchivedFields
    -version
    [2.547s][info][gc,verify] Verifying 1997.929ms
    [4.398s][info][gc,verify] Verifying 1844.962ms
    [6.280s][info][gc,verify] Verifying 1879.111ms
    [8.185s][info][gc,verify] Verifying 1903.419ms
    [10.070s][info][gc,verify] Verifying 1870.905ms
    [11.937s][info][gc,verify] Verifying 1863.947ms
    [13.810s][info][gc,verify] Verifying 1854.141ms
    <GC triggered by -XX:+VerifyArchivedFields>
    [15.650s][info][gc,verify] GC(0) Verifying Before GC 1837.002ms
    [15.691s][info][gc,verify] GC(0) Verifying After GC 16.058ms
    [15.709s][info][gc,verify] Verifying 15.269ms
    [15.724s][info][gc,verify] GC(1) Verifying Before GC 14.672ms
    [15.755s][info][gc,verify] GC(1) Verifying After GC 16.056ms
    [15.771s][info][gc,verify] Verifying 16.212ms
    ....

Thanks
- Ioi



More information about the hotspot-gc-dev mailing list