constMethodOop.hpp revision 1879
84N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 84N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 84N/A * This code is free software; you can redistribute it and/or modify it 84N/A * under the terms of the GNU General Public License version 2 only, as 84N/A * published by the Free Software Foundation. 84N/A * This code is distributed in the hope that it will be useful, but WITHOUT 84N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 84N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 84N/A * version 2 for more details (a copy is included in the LICENSE file that 84N/A * accompanied this code). 84N/A * You should have received a copy of the GNU General Public License version 84N/A * 2 along with this work; if not, write to the Free Software Foundation, 84N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 84N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1895N/A// An constMethodOop represents portions of a Java method which 1920N/A// Memory layout (each line represents a word). Note that most 1920N/A// applications load thousands of methods, so keeping the size of this 1895N/A// structure small has a big impact on footprint. 1895N/A// |------------------------------------------------------| 3824N/A// |------------------------------------------------------| 3824N/A// | exception_table (oop) | 3842N/A// | interp_kind | flags | code_size | 3824N/A// | name index | signature index | 3842N/A// | method_idnum | generic_signature_index | 84N/A// |------------------------------------------------------| 2976N/A// |------------------------------------------------------| 3824N/A// | compressed linenumber table | 2976N/A// | (see class CompressedLineNumberReadStream) | 84N/A// | (note that length is unknown until decompressed) | 2976N/A// | (access flags bit tells whether table is present) | 2976N/A// | (indexed from start of constMethodOop) | 2650N/A// | (elements not necessarily sorted!) | 1895N/A// |------------------------------------------------------| 5612N/A// | localvariable table elements + length (length last) | 1895N/A// | (length is u2, elements are 6-tuples of u2) | 1895N/A// | (see class LocalVariableTableElement) | 1895N/A// | (access flags bit tells whether table is present) | 1895N/A// | (indexed from end of contMethodOop) | 2549N/A// |------------------------------------------------------| 5636N/A// | checked exceptions elements + length (length last) | 2549N/A// | (length is u2, elements are u2) | 2549N/A// | (see class CheckedExceptionElement) | 2549N/A// | (access flags bit tells whether table is present) | 5636N/A// | (indexed from end of constMethodOop) | 1777N/A// |------------------------------------------------------| 5072N/A// Utitily class decribing elements in checked exceptions table inlined in methodOop. 84N/A// Utitily class decribing elements in local variable table inlined in methodOop. // Bit vector of signature // Callers interpret 0=not initialized yet and // -1=too many args to fix, must parse the slow way. // The real initial value is special to account for nonatomicity of 64 bit // loads and stores. This value may updated and read without a lock by // multiple threads, so is volatile. volatile bool _is_conc_safe;
// if true, safe for concurrent GC processing // The oop block. See comment in klass.hpp before making changes. // Backpointer to non-const methodOop (needed for some JVMTI operations) // Raw stackmap data for the method // The exception handler table. 4-tuples of ints [start_pc, end_pc, // handler_pc, catch_type index] For methods with no exceptions the // table is pointing to Universe::the_empty_int_array // Size of Java bytecodes allocated immediately after methodOop. u2 _method_idnum;
// unique identification number for the method within the class // initially corresponds to the index into the methods array. // but this may change with redefinition // backpointer to non-const methodOop // exception handler table // Since reads aren't atomic for 64 bits, if any of the high or low order // word is the initial value, return 0. See init_fingerprint for initval. // Assert only valid if complete/valid 64 bit _fingerprint value is read. "fingerprint cannot change");
"fingerprint should call init to set initial value");
// Is object parsable by gc "u2 is too small to hold method code size in general");
// linenumber table - note that length is unknown until decompression, // see class CompressedLineNumberReadStream. // Garbage collection support // Unique id for the method // Since the size of the compressed line number table is unknown, the // offsets of the other variable sized sections are computed backwards // from the end of the constMethodOop. // First byte after constMethodOop // Last short in constMethodOop #
endif // SHARE_VM_OOPS_CONSTMETHODOOP_HPP