--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/PCDesc.java Wed Aug 19 19:05:18 2009 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/PCDesc.java Thu Aug 20 12:42:57 2009 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@
public class PCDesc extends VMObject {
private static CIntegerField pcOffsetField;
private static CIntegerField scopeDecodeOffsetField;
+ private static CIntegerField pcFlagsField;
static {
VM.registerVMInitializedObserver(new Observer() {
@@ -50,6 +51,7 @@
pcOffsetField = type.getCIntegerField("_pc_offset");
scopeDecodeOffsetField = type.getCIntegerField("_scope_decode_offset");
+ pcFlagsField = type.getCIntegerField("_flags");
}
public PCDesc(Address addr) {
@@ -70,6 +72,12 @@
return code.instructionsBegin().addOffsetTo(getPCOffset());
}
+
+ public boolean getReexecute() {
+ int flags = (int)pcFlagsField.getValue(addr);
+ return ((flags & 0x1)== 1); //first is the reexecute bit
+ }
+
public void print(NMethod code) {
printOn(System.out, code);
}