-
Bug
-
Resolution: Fixed
-
P4
-
9, 10, 11, 12, 13
-
b26
-
generic
-
generic
On 5/18/15 6:56 AM, Andrew Haley wrote:
> This test has been failing with a failed assertion:
>
> Exception in thread "main" java.lang.AssertionError: void NullCheckDroppingsTest.testVarClassCast(java.lang.String) was not deoptimized
> at NullCheckDroppingsTest.checkDeoptimization(NullCheckDroppingsTest.java:331)
> at NullCheckDroppingsTest.runTest(NullCheckDroppingsTest.java:309)
> at NullCheckDroppingsTest.main(NullCheckDroppingsTest.java:125)
>
> It seems that the reason for the failure is that the nmethod for a
> deoptimized method (testVarClassCast) is not removed. This is
> perfectly correct because when testVarClassCast() was trapped, it was
> with an action of Deoptimization::Action_maybe_recompile. When this
> occurs, a method is not marked as dead and continues to be invoked, so
> the test WhiteBox.isMethodCompiled() will still return true.
>
> Therefore, I think this code in checkDeoptimization is incorrect:
>
> // Check deoptimization event (intrinsic Class.cast() works).
> if (WHITE_BOX.isMethodCompiled(method) == deopt) {
> throw new AssertionError(method + " was" + (deopt ? " not" : "") + " deoptimized");
> }
>
> We either need some code in WhiteBox to check for a deoptimization
> event properly or we should just remove this altogether.
>
> So, thoughts? Just delete the check?
>
> Andrew.
> This test has been failing with a failed assertion:
>
> Exception in thread "main" java.lang.AssertionError: void NullCheckDroppingsTest.testVarClassCast(java.lang.String) was not deoptimized
> at NullCheckDroppingsTest.checkDeoptimization(NullCheckDroppingsTest.java:331)
> at NullCheckDroppingsTest.runTest(NullCheckDroppingsTest.java:309)
> at NullCheckDroppingsTest.main(NullCheckDroppingsTest.java:125)
>
> It seems that the reason for the failure is that the nmethod for a
> deoptimized method (testVarClassCast) is not removed. This is
> perfectly correct because when testVarClassCast() was trapped, it was
> with an action of Deoptimization::Action_maybe_recompile. When this
> occurs, a method is not marked as dead and continues to be invoked, so
> the test WhiteBox.isMethodCompiled() will still return true.
>
> Therefore, I think this code in checkDeoptimization is incorrect:
>
> // Check deoptimization event (intrinsic Class.cast() works).
> if (WHITE_BOX.isMethodCompiled(method) == deopt) {
> throw new AssertionError(method + " was" + (deopt ? " not" : "") + " deoptimized");
> }
>
> We either need some code in WhiteBox to check for a deoptimization
> event properly or we should just remove this altogether.
>
> So, thoughts? Just delete the check?
>
> Andrew.
- relates to
-
JDK-8225554 add JFR event for uncommon trap
-
- Closed
-