Request for reviews (XS): 6869822: assert(Universe::narrow_oop_shift() == 0,"use unscaled narrow oop")

John Coomes John.Coomes at sun.com
Tue Aug 11 10:20:14 PDT 2009


Vladimir Kozlov (Vladimir.Kozlov at Sun.COM) wrote:
> 
> http://cr.openjdk.java.net/~kvn/6869822/webrev.00
> 
> Fixed 6869822: assert(Universe::narrow_oop_shift() == 0,"use unscaled narrow oop")
> 
> Problem:
> The test uses -XX:HeapBaseMinAddress=32g flag to force heap allocation
> above 32g and get compressed oops with non zero base.
> In such case the finction Universe::preferred_heap_base() sets
> narrow_oop_shift to 3 and returns 0 as requested heap address.
> But with 0 requested address (default memory address request) OS still may
> allocate small heap bellow 4gb. And this will trigger the assert.
> 
> Solution:
> Replace the assert with narrow_oop_shift set to 0.
> Also use specified on command line HeapBaseMinAddress value as
> heap base address for the first (from three) request.

Looks good, modulo a couple of nits.  Add { } for the body of the new
if statement.  Also the assignment base = NULL on line 776 is
redundant (doesn't hurt, though).

FWIW, if you put the new if statement towards the top, just after the
assert that checks the mode, you wouldn't need the new "base" var.
But either way is fine.

-John




More information about the hotspot-compiler-dev mailing list