RFR (XS) 8215221: Serial GC misreports young GC time

Aleksey Shipilev shade at redhat.com
Wed Mar 6 12:40:51 UTC 2019

Hi Man,

Thanks for taking a look. New webrev:

Still passes hotspot tier1, eyeballing Dacapo logs, jdk-submit is running.

On 2/22/19 4:43 AM, Man Cao wrote:
> I found the following could fix the problem (yes, it's ugly, but I couldn't find cleaner way that
> works in all cases):
> if (!do_young_collection) {
>   gc_prologue(complete);
>   increment_total_collections(complete);
> }
> if (!complete) {
>   increment_total_full_collections();
> }

I see, dang. Rewritten like this:

    if (!do_young_collection) {

    // Accounting quirk: total full collections would be incremented when "complete"
    // is set, by calling increment_total_collections above. However, we also need to
    // account Full collections that had "complete" unset.
    if (!complete) {

> I also found that CollectedHeap._total_collections seems wrong with or without this change, for 
> SerialGC and CMS. It is smaller than the actual number of collections according to the GC ID.
> Reproduction recipe is the same as above.
Yeah, that minor thing needs to be fixed too, in a separate change.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20190306/de288c12/signature.asc>

More information about the hotspot-gc-dev mailing list