United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6837472 com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
JDK-6837472 : com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14

Details
Type:
Bug
Submit Date:
2009-05-05
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u14
Fixed Versions:
hs16 (b06)

Related Reports
Backport:
Backport:

Sub Tasks

Description
See comments.

                                    

Comments
EVALUATION

JDI test set breakpoint in foo3 and expects that when it is called it is inside a monitor (in foo2). 
But since the object l1 in foo2() does not escape it was eliminated together with lock.

    static void foo3() {
        System.out.println("executing foo3");
           
    }
    static void foo2() {
        Object l1 = new Object();
        synchronized(l1) {
            foo3();
        }
    }
                                     
2009-05-12
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/b109e761e927
                                     
2009-06-10
PUBLIC COMMENTS

Problem:
JDI test sets a breakpoint in callee method and expects
to be inside the lock in caller method.
But EA eliminated the locked object and the lock
in caller method since the object does not escape.

Solution:
Disable escape analysis when jvmti/debugger is used.
Add the information about scalar replaced objects into
MonitorInfo and StackValue.
Add support for scalar replaced objects and eliminated locks
into Serviceability Agent.
                                     
2009-06-10



Hardware and Software, Engineered to Work Together