9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_OOPS_CONSTMETHODOOP_HPP
26 #define SHARE_VM_OOPS_CONSTMETHODOOP_HPP
27
28 #include "oops/oop.hpp"
29
30 // An ConstMethod represents portions of a Java method which are not written to after
31 // the classfile is parsed(*see below). This part of the method can be shared across
32 // processes in a read-only section with Class Data Sharing (CDS). It's important
33 // that this class doesn't have virtual functions because the vptr cannot be shared
34 // with CDS.
35 //
36 // Note that most applications load thousands of methods, so keeping the size of this
37 // structure small has a big impact on footprint.
38
39 // The actual bytecodes are inlined after the end of the ConstMethod struct.
40 //
41 // The line number table is compressed and inlined following the byte codes. It is
42 // found as the first byte following the byte codes. Note that accessing the line
43 // number and local variable tables is not performance critical at all.
44 //
45 // The checked exceptions table and the local variable table are inlined after the
46 // line number table, and indexed from the end of the method. We do not compress the
47 // checked exceptions table since the average length is less than 2, and it is used
48 // by reflection so access should be fast. We do not bother to compress the local
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_OOPS_CONSTMETHODOOP_HPP
26 #define SHARE_VM_OOPS_CONSTMETHODOOP_HPP
27
28 #include "oops/oop.hpp"
29 #include "utilities/align.hpp"
30
31 // An ConstMethod represents portions of a Java method which are not written to after
32 // the classfile is parsed(*see below). This part of the method can be shared across
33 // processes in a read-only section with Class Data Sharing (CDS). It's important
34 // that this class doesn't have virtual functions because the vptr cannot be shared
35 // with CDS.
36 //
37 // Note that most applications load thousands of methods, so keeping the size of this
38 // structure small has a big impact on footprint.
39
40 // The actual bytecodes are inlined after the end of the ConstMethod struct.
41 //
42 // The line number table is compressed and inlined following the byte codes. It is
43 // found as the first byte following the byte codes. Note that accessing the line
44 // number and local variable tables is not performance critical at all.
45 //
46 // The checked exceptions table and the local variable table are inlined after the
47 // line number table, and indexed from the end of the method. We do not compress the
48 // checked exceptions table since the average length is less than 2, and it is used
49 // by reflection so access should be fast. We do not bother to compress the local
|