RFR: JDK-8066442 - Add PS and ParOld support

Staffan Friberg staffan.friberg at oracle.com
Mon Dec 8 17:43:28 UTC 2014


Thanks for the good catch!

Here is an updated webrev, 
http://cr.openjdk.java.net/~sfriberg/JDK-8066442/webrev.01

Thanks,
Staffan

On 12/06/2014 01:50 AM, Erik Helin wrote:
> Hi Staffan,
>
> On 2014-12-05 23:14, Staffan Friberg wrote:
>> Hi,
>>
>> Second part of adding PLAB events[1]. This patch adds support for
>> Parallel Scavenge.
>>
>> Bug (sub-task): https://bugs.openjdk.java.net/browse/JDK-8066442
>> Webrev: http://cr.openjdk.java.net/~sfriberg/JDK-8066442/webrev.00
>
> + if (lab != NULL &&
>       gc_tracer->should_report_promotion_in_new_plab_event()) {
> +        ...
> + } else if(gc_tracer->should_report_promotion_outside_plab_event()) {
> +        ...
> + }
>
> The logic is wrong here when:
> - lab != NULL is true
> - gc_tracer->should_report_promotion_in_new_plab_event() is false
> - gc_tracer->should_report_promotion_outside_plab_event() is true
>
> In this case, the first if expression will be false and the second 
> will be true, so the code will send an PromotionOutsidePLAB event, 
> even though the code just allocated a new PLAB. For this case, no 
> event should have been sent.
>
> You must either arrange the if statements like:
> if (lab != NULL) {
>   if (should_send_promotion_in_new_plab_event()) {
>     ...
>   }
> } else if (should_send_promotion_outside_plab_event()) {
>   ...
> }
>
> or like:
> if (lab != NULL && should_send_promotion_in_new_plab_event()) {
>   ...
> } else if (lab == NULL && should_send_promotion_outside_plab_event()) {
>   ...
> }
>
> Thanks,
> Erik
>
>> Thanks,
>> Staffan
>>
>> [1] - (RFR: JDK-8055845 - Add trace event for promoted objects) -
>> http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2014-December/011477.html 
>>
>>
>>



More information about the hotspot-gc-dev mailing list