Fix tenuring threshold reported in GCYoungGarbageCollection event

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Thu Oct 8 11:59:53 UTC 2015


Hi,

I'll approve this change, but I don't really like how it spreads out the tracing 
code even more in the collection code. It will make it harder to extract ti and 
do all tracing in separate helper methods when we want to clean up this code. 
Especially in psScavenge.cpp where the new call is placed all on its own in the 
middle of the collection. I would prefer a solution where we store the value 
somehow or make sure we don't update the GC id until all that belongs to the 
previous GC has been reported.

Anyway, I really appreciate your effort! Thanks for finding and fixing this bug!
I'm just a bit grumpy because our code is such a mess.
/Jesper


Den 8/10/15 kl. 13:28, skrev Erik Helin:
> Hi Carsten,
>
> On 2015-10-07, Carsten Varming wrote:
>> Dear Hotspot-gc-dev members,
>>
>> I noticed that the GCYoungGarbageCollection trace event reports the
>> tenuring threshold of the next gc, i.e., not the gc with the gcId in the
>> event, when using ParellelGC or ParNew (G1 seems to be correct). It looks
>> like the variable _tenuring_threshold is adjusted for the next gc before
>> the event is fired.
>>
>> I attached a small patch against the current jdk9 repo that fixes the issue.
>
> nice catch and thanks for the patch! The GC and runtime team usually
> work in the hotspot repo at
> http://hg.openjdk.java.net/jdk9/hs-rt/hotspot, but the patch applied
> there as well. I created a bug and also uploaded a webrev to make it
> easier for other reviewers to have a look:
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8139134
>
> Webrev:
> http://cr.openjdk.java.net/~ehelin/carsten/8139134/webrev.00/
>
> The patch looks good, Reviewed. I will sponsor the patch (push it to
> the repository) once another reviewer have had a look. I didn't find your
> name the OCA signatories list [0], so you need the sign the OCA [1]
> before I can push the patch.
>
> On 2015-10-07, Carsten Varming wrote:
>> Let me know if this is the wrong email list for this type of change.
>
> This is the correct list.
>
> Thanks,
> Erik
>
>> Carsten
>
> [0]: http://www.oracle.com/technetwork/community/oca-486395.html
> [1]: http://openjdk.java.net/contribute/
>



More information about the hotspot-gc-dev mailing list