Request for reviews (S): 6910605: C2:NullPointerException/ClassCaseException is thrown when C2 with DeoptimizeALot is used
Vladimir Kozlov
Vladimir.Kozlov at Sun.COM
Sat Feb 6 14:43:04 PST 2010
http://cr.openjdk.java.net/~kvn/6910605/webrev.01
The first implementation was not correct for the case when
runtime call is used for multianewarray allocation.
Because of that interpreter should not have _multianewarray
marked as reexecutable (stack is not reset for such case).
Also setting reexecute bit in do_multianewarray() was not
propagated to the AllocateArray node so I have to set it in graphKit.
I replaced "expand_count == 1" check with "ndimensions == 1"
otherwise with MultiArrayExpandLimit=0 we hit ShouldNotReachHere()
in case of one dimension multianewarray because the method
expand_multianewarray() will not be called.
And I removed annoying "reexecute=false" from PcDesc output.
Thanks,
Vladimir
Vladimir Kozlov wrote:
> http://cr.openjdk.java.net/~kvn/6910605/webrev.00
>
> Fixed 6910605: C2: NullPointerException/ClassCaseException is thrown
> when C2 with DeoptimizeALot is used
>
> Problem:
> Regression after 6603492: multianewarray should generate same code as
> anewarray for 1-d arrays.
> After deoptimization interpreter will continue execution after
> _multianewarray
> even if compiled code did not allocate all needed arrays.
>
> Solution:
> Set the reexecute bit for the interpreter to reexecute the
> _multianewarray bytecode
> if deoptimization happens. Do it unconditionally even for one dimension
> array.
>
> Added regression test copied from nsk/coverage/runtime/runtime007
>
> Reviewed by:
>
> Fix verified (y/n): y, tests
>
> Other testing:
> JPRT
>
More information about the hotspot-compiler-dev
mailing list