agent/src/share/classes/sun/jvm/hotspot/oops/Method.java
Print this page
@@ -48,12 +48,10 @@
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("Method");
constMethod = type.getAddressField("_constMethod");
methodData = type.getAddressField("_method_data");
methodSize = new CIntField(type.getCIntegerField("_method_size"), 0);
- maxLocals = new CIntField(type.getCIntegerField("_max_locals"), 0);
- sizeOfParameters = new CIntField(type.getCIntegerField("_size_of_parameters"), 0);
accessFlags = new CIntField(type.getCIntegerField("_access_flags"), 0);
code = type.getAddressField("_code");
vtableIndex = new CIntField(type.getCIntegerField("_vtable_index"), 0);
if (!VM.getVM().isCore()) {
invocationCounter = new CIntField(type.getCIntegerField("_invocation_counter"), 0);
@@ -81,12 +79,10 @@
// Fields
private static AddressField constMethod;
private static AddressField methodData;
private static CIntField methodSize;
- private static CIntField maxLocals;
- private static CIntField sizeOfParameters;
private static CIntField accessFlags;
private static CIntField vtableIndex;
private static CIntField invocationCounter;
private static CIntField backedgeCounter;
private static long bytecodeOffset;
@@ -132,12 +128,12 @@
return (MethodData) VMObjectFactory.newObject(MethodData.class, addr);
}
/** WARNING: this is in words, not useful in this system; use getObjectSize() instead */
public long getMethodSize() { return methodSize.getValue(this); }
public long getMaxStack() { return getConstMethod().getMaxStack(); }
- public long getMaxLocals() { return maxLocals.getValue(this); }
- public long getSizeOfParameters() { return sizeOfParameters.getValue(this); }
+ public long getMaxLocals() { return getConstMethod().getMaxLocals(); }
+ public long getSizeOfParameters() { return getConstMethod().getSizeOfParameters(); }
public long getNameIndex() { return getConstMethod().getNameIndex(); }
public long getSignatureIndex() { return getConstMethod().getSignatureIndex(); }
public long getGenericSignatureIndex() { return getConstMethod().getGenericSignatureIndex(); }
public long getAccessFlags() { return accessFlags.getValue(this); }
public long getCodeSize() { return getConstMethod().getCodeSize(); }
@@ -280,12 +276,10 @@
tty.print("Method " + getName().asString() + getSignature().asString() + "@" + getAddress());
}
public void iterateFields(MetadataVisitor visitor) {
visitor.doCInt(methodSize, true);
- visitor.doCInt(maxLocals, true);
- visitor.doCInt(sizeOfParameters, true);
visitor.doCInt(accessFlags, true);
}
public boolean hasLineNumberTable() {
return getConstMethod().hasLineNumberTable();