8017163: minor question regarding the calculation and logging of card set coarsening statistics

Tianqi Xia txiadev at gmail.com
Tue May 17 14:38:35 UTC 2022


Hi,

I continued to play around with JDK-8017163: G1: Refactor remembered sets,
after going through the code, I was really amazed by the delicate magic of
all those different card containers.

I ran BigRamTester with a 20GB heap for a couple minutes, observed the logs
of coarsening statistics, and noticed the data displayed after "Coarsening
(recent)" seems a little bit abnormal, here is what I mean:

GC(54) Coarsening (recent): Inline->AoC 2119482 (3188) AoC->Howl 757901
(5043) Howl->Full 0 (0) Inline->AoC 5903756 (3889) AoC->BitMap 96986
(11684) BitMap->Full 0 (0)
GC(54) Coarsening (all): Inline->AoC 5064850 (6148) AoC->Howl 1474656
(9533) Howl->Full 0 (0) Inline->AoC 11475611 (7405) AoC->BitMap 202038
(22029) BitMap->Full 0 (0)
GC(55) Coarsening (recent): Inline->AoC 3012918 (3101) AoC->Howl 793681
(4919) Howl->Full 0 (0) Inline->AoC 6170091 (3848) AoC->BitMap 109771
(11292) BitMap->Full 0 (0)
GC(55) Coarsening (all): Inline->AoC 5132400 (6289) AoC->Howl 1551582
(9962) Howl->Full 0 (0) Inline->AoC 12073847 (7737) AoC->BitMap 206757
(22976) BitMap->Full 0 (0)
GC(56) Coarsening (recent): Inline->AoC 2185485 (3318) AoC->Howl 819813
(5303) Howl->Full 0 (0) Inline->AoC 6386169 (4123) AoC->BitMap 101335
(12437) BitMap->Full 0 (0)
GC(56) Coarsening (all): Inline->AoC 5198403 (6419) AoC->Howl 1613494
(10222) Howl->Full 0 (0) Inline->AoC 12556260 (7971) AoC->BitMap 211106
(23729) BitMap->Full 0 (0)
GC(57) Coarsening (recent): Inline->AoC 3077864 (3243) AoC->Howl 830438
(5104) Howl->Full 0 (0) Inline->AoC 6458370 (4032) AoC->BitMap 113982
(12005) BitMap->Full 0 (0)
GC(57) Coarsening (all): Inline->AoC 5263349 (6561) AoC->Howl 1650251
(10407) Howl->Full 0 (0) Inline->AoC 12844539 (8155) AoC->BitMap 215317
(24442) BitMap->Full 0 (0)
GC(58) Coarsening (recent): Inline->AoC 2249421 (3462) AoC->Howl 835996
(5463) Howl->Full 0 (0) Inline->AoC 6513146 (4294) AoC->BitMap 105470
(13080) BitMap->Full 0 (0)
GC(58) Coarsening (all): Inline->AoC 5327285 (6705) AoC->Howl 1666434
(10567) Howl->Full 0 (0) Inline->AoC 12971516 (8326) AoC->BitMap 219452
(25085) BitMap->Full 0 (0)



>From the comments in code, "Coarsening (recent)" represents the number of
coarsening happened during the lastest GC cycle, in my understanding it
should be calculated by something like:

current total coarsening - previous total coarsening

However, after looking at G1CardSet::print_coarsen_stats) the recent
coarsening stats are instead calculated by:

current total coarsening - coarsening happened in previous(the one before
the latest) GC cycle

Am I missing something here?


Thanks,
Tianqi



More information about the hotspot-gc-dev mailing list