Request for reviews (M): 6833129 : specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Mon Jul 6 17:55:11 PDT 2009

changpeng fang - Sun Microsystems - Santa Clara United States wrote:
>> Also in src/share/vm/opto/callnode.hpp add an assert
>> to check that bci is no changed when _restart is set
>> void set_bci(int bci) { assert(!_restart, ""); _bci = bci; }
> Do you meant the restart bit must be false at the time that we
> set up bci?

Yes, it should be false when we set or change bci.
Since _bci field is private it could be changed only by set_bci().

Your changes look good but you need an additional reviews
before the push.


>> We talked about using  PreserveJVMState pjvms(this) instead
>> of restoring stack and restart flag in intrinsics?
>> Why you did not use it?
> Just as we discussed a moment ago, I added an assert restart false before
> we set it to true.
> Here is the updated webrev link!
> Thanks,
> Changpeng
>> thanks,
>> Vladimir
>> changpeng fang - Sun Microsystems - Santa Clara United States wrote:
>>> Problem:
>>> The problem is in intrinsics Object.clone and Arrays.copyOf. When 
>>> de-optimization occurs on the slow path for array/instance
>>> allocation, the Interpreter will continue execution in next bc after 
>>> the slow allocation calls without actual copying.
>>> Solution:
>>> Add a restart bit in debuginfo to direct the deopt to restart 
>>> execution of the bytecode  that invokes  Object.clone/Arrays.copyOf.
>>> The restart bit is set up in Inline Intrinsics of 
>>> Object.clone/Arrays.copyOf.
>>> Tests:
>>> Passed specjvm98, JPRT and the test case of clone in the bug report.
>>> Thanks,
>>> Changpeng

More information about the hotspot-compiler-dev mailing list