RFR (S): 8013791: G1: G1CollectorPolicy::initialize_flags() may set min_alignment > max_alignment

Bengt Rutisson bengt.rutisson at oracle.com
Thu May 2 20:47:30 UTC 2013


Jon,

Thanks for looking at this!

On 5/2/13 9:42 PM, Jon Masamitsu wrote:
> Bengt,
>
> Change looks correct.  I'd suggest enhancing the message from the
> assertion to include printing values being checked plus the region size
> and card table size.

Good idea.

I went with Thomas suggestion to move the asserts into 
CollectorPolicy::initialize_flags(). There I don't have access to the 
region size or card table size. But I added the min and max alignment 
values.

Will send out an updated webrev now.

Thanks,
Bengt

>
> Jon
>
> On 5/2/13 11:16 AM, Bengt Rutisson wrote:
>>
>> Hi everyone,
>>
>> Could I have a couple of reviews for this small patch?
>>
>> http://cr.openjdk.java.net/~brutisso/8013791/webrev.00/
>>
>> For G1 it is important that the heap size is aligned by the region 
>> size. The ergonomics will pick CollectorPolicy::max_alignment() for 
>> aligning the heap, but this alignment is based on the card table 
>> rather than the region size.
>>
>> This fix makes sure that we pick the larger alignment for the 
>> max_alignment value and it adds the same assert for the min and max 
>> alignments that is available in GenCollectorPolicy::initialize_flags().
>>
>> Thanks,
>> Bengt
>




More information about the hotspot-gc-dev mailing list