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

Tianqi Xia txiadev at gmail.com
Thu May 26 16:05:12 UTC 2022


Hi,

One more observation on how the coarsening statistics are printed.

Right now coarsening stats are printed 3 times during a GC cycle:

The first one happens when G1HeapPrinterMark is constructed, this one
obtains its data from the _coarsenings field of G1RemSetSummary, and it
covers the coarsening stats from the end of last GC cycle to the beginning
of current GC cycle.

The second one happens when G1HeapPrinterMark is destructed, its source is
the _coarsen_stats and _last_coarsen_stats fields of G1CardSet, and
covers coarsening stats from the end of last GC cycle to the end of current
GC cycle, with both recent- and all- statistics.

The third printing happens immediately after the second one, its source is
again the _coarsenings field of G1RemSetSummary, and it covers the
coarsening stats from the beginning of current GC cycle to the end of
current GC cycle.

Based on testing results of BigRamTester and some other benchmarks, data
displayed by the first one and the second one are almost identical, despite
the fact that the second one is more verbose, and in most cases the third
one just displays a bunch of zeros.

Is it possible to just keep the second one and remove others? This change
can keep the logging of coarsening stats more concise, and save the effort
of maintaining a copy of these data in G1RemSetSummary.

I understand there is nothing wrong with the current implementation, just
some thoughts to make the code a little bit cleaner.

Thanks,
Tianqi

On Thu, May 19, 2022 at 7:11 PM Tianqi Xia <txiadev at gmail.com> wrote:

> Not a problem, thanks for doing that for me :)
>
> Regards,
> Tianqi
>
> On Wed, May 18, 2022 at 11:25 PM Thomas Schatzl <thomas.schatzl at oracle.com>
> wrote:
>
>> Hi,
>>
>> On 18.05.22 08:11, Tianqi Xia wrote:
>> > Sure thing, I will take a look.
>> >
>> > Thanks,
>> > Tianqi
>>
>>    great, thanks. Do not be surprised that I assigned the CR to myselves
>> - just to reserve it for you.
>>
>> Thanks,
>>    Thomas
>>
>



More information about the hotspot-gc-dev mailing list