Request for reviews (S): 6896084: VM does not reserveprotected page below heap for compressed oops implicit null checks
Vladimir Kozlov
Vladimir.Kozlov at Sun.COM
Thu Oct 29 20:41:12 UTC 2009
Thank you, John
Vladimir
John Coomes wrote:
> Vladimir Kozlov (Vladimir.Kozlov at Sun.COM) wrote:
>> ...
>> http://cr.openjdk.java.net/~kvn/6896084/webrev.00
>>
>> Fixed 6896084: VM does not reserve protected page below heap for compressed oops implicit null checks
>>
>> Problem:
>> VM should reserve protected page below heap for compressed oops
>> implicit null checks in compiled code (see 6716785).
>> After zero based compressed oops changes (6791178) the page is
>> not reserved because undefined narrow_oop_base (NULL by default)
>> is used in ReservedHeapSpace() to determine if the page is needed.
>>
>> Solution:
>> Set narrow_oop_base and narrow_oop_use_implicit_null_checks
>> values according to compressed oops encoding mode in
>> Universe::preferred_heap_base() which is called before
>> ReservedHeapSpace() constructors.
>
> Your changes look good to me. Some comment typos/nits:
>
> 788 // Set not NULL value to indicate the need of narrow_oop_base.
>
> The comment didn't help me understand why it had to be non-null.
> Maybe "Set to a non-NULL value so the ReservedSpace ctor computes the
> correct no-access prefix."
>
> Not your change, but the conditional expression in ReservedHeapSpace
> ctor that uses this should be made into a static function, e.g.,
> no_access_prefix_size(...). I'll add it to my cleanups list.
>
> 794 // addressing mode, when large pages are specified on windows.
>
> FWIW, the comma isn't necessary.
>
> -John
>
More information about the hotspot-gc-dev
mailing list