Request for review (vs) - 6843292

Tony Printezis Antonios.Printezis at sun.com
Thu Jul 30 18:07:42 UTC 2009


BTW, the conversation I had with Jon was whether bool guarded = ... 
should really be debug_only() or the equivalent of assert_only() (which 
we can only do with #ifdef ASSERT right now), given that guarded is only 
used in an assert. Is there a policy to use debug_only() for anything 
that's only used in asserts?

Tony

John Coomes wrote:
> Jon Masamitsu (Jon.Masamitsu at Sun.COM) wrote:
>   
>> 6843292: "Expect to be beyond new region unless impacting another 
>> region" assertion too strong"
>>
>> Relax the assertion for the case where the new region extends into the 
>> guard page.
>>
>> http://cr.openjdk.java.net/~jmasa/6843292
>>     
>
> Looks fine.  You could change this:
>
>  259     HeapWord* new_end_for_commit = new_end_aligned;
>  260 
>  261     debug_only(bool guarded = false;)
>  262     if (new_end_for_commit > _guard_region.start()) {
>  263       new_end_for_commit = _guard_region.start();
>  264       debug_only(guarded = true;)
>  265     }
>
> to this:
>
>     DEBUG_ONLY(const bool guarded = new_end_aligned > _guard_region.start());
>     HeapWord* new_end_for_commit = MIN2(new_end_aligned, _guard_region.start());
>
> which is easier to read (IMHO, of course).
>
> -John
>
>   

-- 
---------------------------------------------------------------------
| Tony Printezis, Staff Engineer   | Sun Microsystems Inc.          |
|                                  | MS UBUR02-311                  |
| e-mail: tony.printezis at sun.com   | 35 Network Drive               |
| office: +1 781 442 0998 (x20998) | Burlington, MA 01803-2756, USA |
---------------------------------------------------------------------
e-mail client: Thunderbird (Linux)





More information about the hotspot-gc-dev mailing list