comparison agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 71afdabfd05b
children f16e75e0cf11
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
59 // HotSpot specific constant pool constant types. 59 // HotSpot specific constant pool constant types.
60 60
61 // For bad value initialization 61 // For bad value initialization
62 public static final int JVM_CONSTANT_Invalid = 0; 62 public static final int JVM_CONSTANT_Invalid = 0;
63 63
64 // Temporary tag until actual use 64 public static final int JVM_CONSTANT_UnresolvedClass = 100; // Temporary tag until actual use
65 public static final int JVM_CONSTANT_UnresolvedClass = 100; 65 public static final int JVM_CONSTANT_ClassIndex = 101; // Temporary tag while constructing constant pool
66 66 public static final int JVM_CONSTANT_StringIndex = 102; // Temporary tag while constructing constant pool
67 // Temporary tag while constructing constant pool 67 public static final int JVM_CONSTANT_UnresolvedClassInError = 103; // Error tag due to resolution error
68 public static final int JVM_CONSTANT_ClassIndex = 101; 68 public static final int JVM_CONSTANT_MethodHandleInError = 104; // Error tag due to resolution error
69 69 public static final int JVM_CONSTANT_MethodTypeInError = 105; // Error tag due to resolution error
70 // Temporary tag until actual use 70 public static final int JVM_CONSTANT_Object = 106; // Required for BoundMethodHandle arguments.
71 public static final int JVM_CONSTANT_UnresolvedString = 102;
72
73 // Temporary tag while constructing constant pool
74 public static final int JVM_CONSTANT_StringIndex = 103;
75
76 // Temporary tag while constructing constant pool
77 public static final int JVM_CONSTANT_UnresolvedClassInError = 104;
78 71
79 // 1.5 major/minor version numbers from JVM spec. 3rd edition 72 // 1.5 major/minor version numbers from JVM spec. 3rd edition
80 public static final short MAJOR_VERSION = 49; 73 public static final short MAJOR_VERSION = 49;
81 public static final short MINOR_VERSION = 0; 74 public static final short MINOR_VERSION = 0;
82 75
107 // from accessFlags.hpp - hotspot internal flags 100 // from accessFlags.hpp - hotspot internal flags
108 101
109 // flags actually put in .class file 102 // flags actually put in .class file
110 public static final long JVM_ACC_WRITTEN_FLAGS = 0x00007FFF; 103 public static final long JVM_ACC_WRITTEN_FLAGS = 0x00007FFF;
111 104
112 // methodOop flags 105 // Method* flags
113 // monitorenter/monitorexit bytecodes match 106 // monitorenter/monitorexit bytecodes match
114 public static final long JVM_ACC_MONITOR_MATCH = 0x10000000; 107 public static final long JVM_ACC_MONITOR_MATCH = 0x10000000;
115 // Method contains monitorenter/monitorexit bytecodes 108 // Method contains monitorenter/monitorexit bytecodes
116 public static final long JVM_ACC_HAS_MONITOR_BYTECODES = 0x20000000; 109 public static final long JVM_ACC_HAS_MONITOR_BYTECODES = 0x20000000;
117 // Method has loops 110 // Method has loops
128 public static final long JVM_ACC_HAS_CHECKED_EXCEPTIONS = 0x00400000; 121 public static final long JVM_ACC_HAS_CHECKED_EXCEPTIONS = 0x00400000;
129 public static final long JVM_ACC_HAS_JSRS = 0x00800000; 122 public static final long JVM_ACC_HAS_JSRS = 0x00800000;
130 // RedefineClasses() has made method obsolete 123 // RedefineClasses() has made method obsolete
131 public static final long JVM_ACC_IS_OBSOLETE = 0x00010000; 124 public static final long JVM_ACC_IS_OBSOLETE = 0x00010000;
132 125
133 // klassOop flags 126 // Klass* flags
134 // True if this class has miranda methods in it's vtable 127 // True if this class has miranda methods in it's vtable
135 public static final long JVM_ACC_HAS_MIRANDA_METHODS = 0x10000000; 128 public static final long JVM_ACC_HAS_MIRANDA_METHODS = 0x10000000;
136 // True if klass has a vanilla default constructor 129 // True if klass has a vanilla default constructor
137 public static final long JVM_ACC_HAS_VANILLA_CONSTRUCTOR = 0x20000000; 130 public static final long JVM_ACC_HAS_VANILLA_CONSTRUCTOR = 0x20000000;
138 // True if klass has a non-empty finalize() method 131 // True if klass has a non-empty finalize() method
139 public static final long JVM_ACC_HAS_FINALIZER = 0x40000000; 132 public static final long JVM_ACC_HAS_FINALIZER = 0x40000000;
140 // True if klass supports the Clonable interface 133 // True if klass supports the Clonable interface
141 public static final long JVM_ACC_IS_CLONEABLE = 0x80000000; 134 public static final long JVM_ACC_IS_CLONEABLE = 0x80000000;
142 135
143 // klassOop and methodOop flags 136 // Klass* and Method* flags
144 public static final long JVM_ACC_HAS_LOCAL_VARIABLE_TABLE = 0x00200000; 137 public static final long JVM_ACC_HAS_LOCAL_VARIABLE_TABLE = 0x00200000;
145 // flags promoted from methods to the holding klass 138 // flags promoted from methods to the holding klass
146 public static final long JVM_ACC_PROMOTED_FLAGS = 0x00200000; 139 public static final long JVM_ACC_PROMOTED_FLAGS = 0x00200000;
147 140
148 // field flags 141 // field flags
149 // Note: these flags must be defined in the low order 16 bits because 142 // Note: these flags must be defined in the low order 16 bits because
150 // instanceKlass only stores a ushort worth of information from the 143 // InstanceKlass only stores a ushort worth of information from the
151 // AccessFlags value. 144 // AccessFlags value.
152 // field access is watched by JVMTI 145 // field access is watched by JVMTI
153 public static final long JVM_ACC_FIELD_ACCESS_WATCHED = 0x00002000; 146 public static final long JVM_ACC_FIELD_ACCESS_WATCHED = 0x00002000;
154 // field modification is watched by JVMTI 147 // field modification is watched by JVMTI
155 public static final long JVM_ACC_FIELD_MODIFICATION_WATCHED = 0x00008000; 148 public static final long JVM_ACC_FIELD_MODIFICATION_WATCHED = 0x00008000;