< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java

Print this page
*** 143,13 ***
          Assert.that(mv.eliminated() && ownerSV.objIsScalarReplaced(), "monitor should be eliminated for scalar replaced object");
          // Put klass for scalar replaced object.
          ScopeValue kv = ((ObjectValue)ov).getKlass();
          Assert.that(kv.isConstantOop(), "klass should be oop constant for scalar replaced object");
          OopHandle k = ((ConstantOopReadValue)kv).getValue();
!         result.add(new MonitorInfo(k, resolveMonitorLock(mv.basicLock()), mv.eliminated(), true));
        } else {
!         result.add(new MonitorInfo(ownerSV.getObject(), resolveMonitorLock(mv.basicLock()), mv.eliminated(), false));
        }
      }
      return result;
    }
  
--- 143,13 ---
          Assert.that(mv.eliminated() && ownerSV.objIsScalarReplaced(), "monitor should be eliminated for scalar replaced object");
          // Put klass for scalar replaced object.
          ScopeValue kv = ((ObjectValue)ov).getKlass();
          Assert.that(kv.isConstantOop(), "klass should be oop constant for scalar replaced object");
          OopHandle k = ((ConstantOopReadValue)kv).getValue();
!         result.add(new MonitorInfo(k, mv.eliminated(), true));
        } else {
!         result.add(new MonitorInfo(ownerSV.getObject(), mv.eliminated(), false));
        }
      }
      return result;
    }
  

*** 308,22 ***
  
      // Unknown ScopeValue type
      Assert.that(false, "Should not reach here");
      return new StackValue(0);   // dummy
    }
- 
-   private BasicLock resolveMonitorLock(Location location) {
-     if (Assert.ASSERTS_ENABLED) {
-       Assert.that(location.isStack(), "for now we only look at the stack");
-     }
-     int byteOffset = location.getStackOffset();
-     // (stack picture)
-     // high: [     ]  byte_offset + wordSize
-     // low   [     ]  byte_offset
-     //
-     // sp->  [     ]  0
-     // the byte_offset is the distance from the stack pointer to the lowest address
-     // The frame's original stack pointer, before any extension by its callee
-     // (due to Compiler1 linkage on SPARC), must be used.
-     return new BasicLock(getFrame().getUnextendedSP().addOffsetTo(byteOffset));
-   }
  }
--- 308,6 ---
< prev index next >