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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2000, 2011, Oracle and/or its affiliates. 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2000, 2012, Oracle and/or its affiliates. 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 46,56 **** } 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); --- 46,55 ----
*** 81,91 **** 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; --- 80,89 ----
*** 123,133 **** private static AddressCField fromCompiledCodeEntryPoint; */ // 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); } --- 121,133 ---- private static AddressCField fromCompiledCodeEntryPoint; */ // Accessors for declared fields public ConstMethod getConstMethod() { return (ConstMethod) constMethod.getValue(this); } ! public ConstantPool getConstants() { ! return getConstMethod().getConstants(); ! } 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); }
*** 279,289 **** public void iterateFields(OopVisitor visitor, boolean doVMFields) { super.iterateFields(visitor, doVMFields); if (doVMFields) { visitor.doOop(constMethod, true); - visitor.doOop(constants, true); visitor.doCInt(methodSize, true); visitor.doCInt(maxStack, true); visitor.doCInt(maxLocals, true); visitor.doCInt(sizeOfParameters, true); visitor.doCInt(accessFlags, true); --- 279,288 ----