agent/src/share/classes/sun/jvm/hotspot/oops/Method.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7088955 Cdiff agent/src/share/classes/sun/jvm/hotspot/oops/Method.java

agent/src/share/classes/sun/jvm/hotspot/oops/Method.java

Print this page

        

*** 47,68 **** --- 47,73 ---- private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { Type type = db.lookupType("methodOopDesc"); constMethod = new OopField(type.getOopField("_constMethod"), 0); constants = new OopField(type.getOopField("_constants"), 0); + methodData = new OopField(type.getOopField("_method_data"), 0); methodSize = new CIntField(type.getCIntegerField("_method_size"), 0); maxStack = new CIntField(type.getCIntegerField("_max_stack"), 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); + backedgeCounter = new CIntField(type.getCIntegerField("_backedge_counter"), 0); } bytecodeOffset = type.getSize(); + interpreterThrowoutCountField = new CIntField(type.getCIntegerField("_interpreter_throwout_count"), 0); + interpreterInvocationCountField = new CIntField(type.getCIntegerField("_interpreter_invocation_count"), 0); + /* interpreterEntry = type.getAddressField("_interpreter_entry"); fromCompiledCodeEntryPoint = type.getAddressField("_from_compiled_code_entry_point"); */
*** 77,97 **** --- 82,107 ---- public boolean isMethod() { return true; } // Fields private static OopField constMethod; private static OopField constants; + private static OopField methodData; private static CIntField methodSize; private static CIntField maxStack; 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; private static AddressField code; + private static CIntField interpreterThrowoutCountField; + private static CIntField interpreterInvocationCountField; + // constant method names - <init>, <clinit> // Initialized lazily to avoid initialization ordering dependencies between Method and SymbolTable private static Symbol objectInitializerName; private static Symbol classInitializerName; private static Symbol objectInitializerName() {
*** 114,123 **** --- 124,134 ---- */ // Accessors for declared fields public ConstMethod getConstMethod() { return (ConstMethod) constMethod.getValue(this); } public ConstantPool getConstants() { return (ConstantPool) constants.getValue(this); } + public MethodData getMethodData() { return (MethodData) methodData.getValue(this); } public TypeArray getExceptionTable() { return getConstMethod().getExceptionTable(); } /** WARNING: this is in words, not useful in this system; use getObjectSize() instead */ public long getMethodSize() { return methodSize.getValue(this); } public long getMaxStack() { return maxStack.getValue(this); } public long getMaxLocals() { return maxLocals.getValue(this); }
*** 132,141 **** --- 143,158 ---- if (Assert.ASSERTS_ENABLED) { Assert.that(!VM.getVM().isCore(), "must not be used in core build"); } return invocationCounter.getValue(this); } + public long getBackedgeCounter() { + if (Assert.ASSERTS_ENABLED) { + Assert.that(!VM.getVM().isCore(), "must not be used in core build"); + } + return backedgeCounter.getValue(this); + } // get associated compiled native method, if available, else return null. public NMethod getNativeMethod() { Address addr = code.getValue(getHandle()); return (NMethod) VMObjectFactory.newObject(NMethod.class, addr);
*** 331,336 **** --- 348,360 ---- buf.append("("); new SignatureConverter(getSignature(), buf).iterateParameters(); buf.append(")"); return buf.toString().replace('/', '.'); } + public int interpreterThrowoutCount() { + return (int) interpreterThrowoutCountField.getValue(getHandle()); + } + + public int interpreterInvocationCount() { + return (int) interpreterInvocationCountField.getValue(getHandle()); + } }
agent/src/share/classes/sun/jvm/hotspot/oops/Method.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File