aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoracorn <none@none>2009-09-04 12:53:02 -0400
committeracorn <none@none>2009-09-04 12:53:02 -0400
commit3c2d5cd29ee7b9849483cd8f8de7852fd3d7e8eb (patch)
treeb98eeaeaaca0c80f1a65ed901ecf8d5c80732f27
parentc5ac487304ac2f019f1a86e100fba56cf1c3ea1f (diff)
6830542: Performance: JVM_DefineClass already verified.
Reviewed-by: kamg, phh
-rw-r--r--make/linux/makefiles/mapfile-vers-debug1
-rw-r--r--make/linux/makefiles/mapfile-vers-product1
-rw-r--r--make/solaris/makefiles/mapfile-vers1
-rw-r--r--src/share/vm/classfile/classFileParser.cpp10
-rw-r--r--src/share/vm/classfile/classFileParser.hpp4
-rw-r--r--src/share/vm/classfile/classLoader.cpp1
-rw-r--r--src/share/vm/classfile/systemDictionary.cpp3
-rw-r--r--src/share/vm/classfile/systemDictionary.hpp4
-rw-r--r--src/share/vm/classfile/verifier.cpp13
-rw-r--r--src/share/vm/classfile/verifier.hpp10
-rw-r--r--src/share/vm/code/dependencies.cpp4
-rw-r--r--src/share/vm/oops/instanceKlass.cpp2
-rw-r--r--src/share/vm/oops/instanceKlass.hpp31
-rw-r--r--src/share/vm/oops/instanceKlassKlass.cpp2
-rw-r--r--src/share/vm/prims/jni.cpp3
-rw-r--r--src/share/vm/prims/jvm.cpp19
-rw-r--r--src/share/vm/prims/jvm.h11
-rw-r--r--src/share/vm/prims/jvmtiRedefineClasses.cpp4
-rw-r--r--src/share/vm/runtime/vmStructs.cpp13
19 files changed, 103 insertions, 34 deletions
diff --git a/make/linux/makefiles/mapfile-vers-debug b/make/linux/makefiles/mapfile-vers-debug
index 63cce8b15..65765b296 100644
--- a/make/linux/makefiles/mapfile-vers-debug
+++ b/make/linux/makefiles/mapfile-vers-debug
@@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis;
JVM_DefineClass;
JVM_DefineClassWithSource;
+ JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus;
JVM_DisableCompiler;
JVM_DoPrivileged;
diff --git a/make/linux/makefiles/mapfile-vers-product b/make/linux/makefiles/mapfile-vers-product
index 6a76dd9e9..884cbd045 100644
--- a/make/linux/makefiles/mapfile-vers-product
+++ b/make/linux/makefiles/mapfile-vers-product
@@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis;
JVM_DefineClass;
JVM_DefineClassWithSource;
+ JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus;
JVM_DisableCompiler;
JVM_DoPrivileged;
diff --git a/make/solaris/makefiles/mapfile-vers b/make/solaris/makefiles/mapfile-vers
index 8c9d68830..1f88096e4 100644
--- a/make/solaris/makefiles/mapfile-vers
+++ b/make/solaris/makefiles/mapfile-vers
@@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis;
JVM_DefineClass;
JVM_DefineClassWithSource;
+ JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus;
JVM_DisableCompiler;
JVM_DoPrivileged;
diff --git a/src/share/vm/classfile/classFileParser.cpp b/src/share/vm/classfile/classFileParser.cpp
index 1819cb45f..8f11ca0d8 100644
--- a/src/share/vm/classfile/classFileParser.cpp
+++ b/src/share/vm/classfile/classFileParser.cpp
@@ -2547,6 +2547,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
KlassHandle host_klass,
GrowableArray<Handle>* cp_patches,
symbolHandle& parsed_name,
+ bool verify,
TRAPS) {
// So that JVMTI can cache class file in the state before retransformable agents
// have modified it
@@ -2591,7 +2592,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
instanceKlassHandle nullHandle;
// Figure out whether we can skip format checking (matching classic VM behavior)
- _need_verify = Verifier::should_verify_for(class_loader());
+ _need_verify = Verifier::should_verify_for(class_loader(), verify);
// Set the verify flag in stream
cfs->set_verify(_need_verify);
@@ -3205,6 +3206,9 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
// Fill in information already parsed
this_klass->set_access_flags(access_flags);
+ if (verify) {
+ this_klass->set_should_verify_class();
+ }
jint lh = Klass::instance_layout_helper(instance_size, false);
this_klass->set_layout_helper(lh);
assert(this_klass->oop_is_instance(), "layout is correct");
@@ -3213,7 +3217,9 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
//this_klass->set_super(super_klass());
this_klass->set_class_loader(class_loader());
this_klass->set_nonstatic_field_size(nonstatic_field_size);
- this_klass->set_has_nonstatic_fields(has_nonstatic_fields);
+ if (has_nonstatic_fields) {
+ this_klass->set_has_nonstatic_fields();
+ }
this_klass->set_static_oop_field_size(fac.static_oop_count);
cp->set_pool_holder(this_klass());
this_klass->set_constants(cp());
diff --git a/src/share/vm/classfile/classFileParser.hpp b/src/share/vm/classfile/classFileParser.hpp
index db1d291c0..400922075 100644
--- a/src/share/vm/classfile/classFileParser.hpp
+++ b/src/share/vm/classfile/classFileParser.hpp
@@ -257,9 +257,10 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
Handle class_loader,
Handle protection_domain,
symbolHandle& parsed_name,
+ bool verify,
TRAPS) {
KlassHandle no_host_klass;
- return parseClassFile(name, class_loader, protection_domain, no_host_klass, NULL, parsed_name, THREAD);
+ return parseClassFile(name, class_loader, protection_domain, no_host_klass, NULL, parsed_name, verify, THREAD);
}
instanceKlassHandle parseClassFile(symbolHandle name,
Handle class_loader,
@@ -267,6 +268,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
KlassHandle host_klass,
GrowableArray<Handle>* cp_patches,
symbolHandle& parsed_name,
+ bool verify,
TRAPS);
// Verifier checks
diff --git a/src/share/vm/classfile/classLoader.cpp b/src/share/vm/classfile/classLoader.cpp
index 5b517add1..669beb7ff 100644
--- a/src/share/vm/classfile/classLoader.cpp
+++ b/src/share/vm/classfile/classLoader.cpp
@@ -874,6 +874,7 @@ instanceKlassHandle ClassLoader::load_classfile(symbolHandle h_name, TRAPS) {
class_loader,
protection_domain,
parsed_name,
+ false,
CHECK_(h));
// add to package table
diff --git a/src/share/vm/classfile/systemDictionary.cpp b/src/share/vm/classfile/systemDictionary.cpp
index a1efcc595..726048b87 100644
--- a/src/share/vm/classfile/systemDictionary.cpp
+++ b/src/share/vm/classfile/systemDictionary.cpp
@@ -970,6 +970,7 @@ klassOop SystemDictionary::parse_stream(symbolHandle class_name,
host_klass,
cp_patches,
parsed_name,
+ true,
THREAD);
@@ -1025,6 +1026,7 @@ klassOop SystemDictionary::resolve_from_stream(symbolHandle class_name,
Handle class_loader,
Handle protection_domain,
ClassFileStream* st,
+ bool verify,
TRAPS) {
// Classloaders that support parallelism, e.g. bootstrap classloader,
@@ -1055,6 +1057,7 @@ klassOop SystemDictionary::resolve_from_stream(symbolHandle class_name,
class_loader,
protection_domain,
parsed_name,
+ verify,
THREAD);
const char* pkg = "java/";
diff --git a/src/share/vm/classfile/systemDictionary.hpp b/src/share/vm/classfile/systemDictionary.hpp
index 14246e6ff..b7c820336 100644
--- a/src/share/vm/classfile/systemDictionary.hpp
+++ b/src/share/vm/classfile/systemDictionary.hpp
@@ -259,7 +259,9 @@ public:
TRAPS);
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
- static klassOop resolve_from_stream(symbolHandle class_name, Handle class_loader, Handle protection_domain, ClassFileStream* st, TRAPS);
+ static klassOop resolve_from_stream(symbolHandle class_name, Handle class_loader,
+ Handle protection_domain,
+ ClassFileStream* st, bool verify, TRAPS);
// Lookup an already loaded class. If not found NULL is returned.
static klassOop find(symbolHandle class_name, Handle class_loader, Handle protection_domain, TRAPS);
diff --git a/src/share/vm/classfile/verifier.cpp b/src/share/vm/classfile/verifier.cpp
index bb5edc785..dd947d19c 100644
--- a/src/share/vm/classfile/verifier.cpp
+++ b/src/share/vm/classfile/verifier.cpp
@@ -53,8 +53,8 @@ static void* verify_byte_codes_fn() {
// Methods in Verifier
-bool Verifier::should_verify_for(oop class_loader) {
- return class_loader == NULL ?
+bool Verifier::should_verify_for(oop class_loader, bool should_verify_class) {
+ return (class_loader == NULL || !should_verify_class) ?
BytecodeVerificationLocal : BytecodeVerificationRemote;
}
@@ -68,7 +68,7 @@ bool Verifier::relax_verify_for(oop loader) {
return !need_verify;
}
-bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, TRAPS) {
+bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool should_verify_class, TRAPS) {
ResourceMark rm(THREAD);
HandleMark hm;
@@ -81,7 +81,7 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, TRAPS) {
// If the class should be verified, first see if we can use the split
// verifier. If not, or if verification fails and FailOverToOldVerifier
// is set, then call the inference verifier.
- if (is_eligible_for_verification(klass)) {
+ if (is_eligible_for_verification(klass, should_verify_class)) {
if (TraceClassInitialization) {
tty->print_cr("Start class verification for: %s", klassName);
}
@@ -141,12 +141,13 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, TRAPS) {
}
}
-bool Verifier::is_eligible_for_verification(instanceKlassHandle klass) {
+bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) {
symbolOop name = klass->name();
klassOop refl_magic_klass = SystemDictionary::reflect_magic_klass();
- return (should_verify_for(klass->class_loader()) &&
+ return (should_verify_for(klass->class_loader(), should_verify_class) &&
// return if the class is a bootstrapping class
+ // or defineClass specified not to verify by default (flags override passed arg)
// We need to skip the following four for bootstraping
name != vmSymbols::java_lang_Object() &&
name != vmSymbols::java_lang_Class() &&
diff --git a/src/share/vm/classfile/verifier.hpp b/src/share/vm/classfile/verifier.hpp
index 2c06b1ee6..a1dc6ae13 100644
--- a/src/share/vm/classfile/verifier.hpp
+++ b/src/share/vm/classfile/verifier.hpp
@@ -34,16 +34,18 @@ class Verifier : AllStatic {
* Otherwise, no exception is thrown and the return indicates the
* error.
*/
- static bool verify(instanceKlassHandle klass, Mode mode, TRAPS);
+ static bool verify(instanceKlassHandle klass, Mode mode, bool should_verify_class, TRAPS);
- // Return false if the class is loaded by the bootstrap loader.
- static bool should_verify_for(oop class_loader);
+ // Return false if the class is loaded by the bootstrap loader,
+ // or if defineClass was called requesting skipping verification
+ // -Xverify:all/none override this value
+ static bool should_verify_for(oop class_loader, bool should_verify_class);
// Relax certain verifier checks to enable some broken 1.1 apps to run on 1.2.
static bool relax_verify_for(oop class_loader);
private:
- static bool is_eligible_for_verification(instanceKlassHandle klass);
+ static bool is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class);
static symbolHandle inference_verify(
instanceKlassHandle klass, char* msg, size_t msg_len, TRAPS);
};
diff --git a/src/share/vm/code/dependencies.cpp b/src/share/vm/code/dependencies.cpp
index 8af296fd4..8dd4707c6 100644
--- a/src/share/vm/code/dependencies.cpp
+++ b/src/share/vm/code/dependencies.cpp
@@ -1464,7 +1464,7 @@ void DepChange::initialize() {
for (ContextStream str(*this); str.next(); ) {
klassOop d = str.klass();
assert(!instanceKlass::cast(d)->is_marked_dependent(), "checking");
- instanceKlass::cast(d)->set_is_marked_dependent(true);
+ instanceKlass::cast(d)->set_is_marked_dependent();
}
}
@@ -1473,7 +1473,7 @@ DepChange::~DepChange() {
// Unmark transitive interfaces
for (ContextStream str(*this); str.next(); ) {
klassOop d = str.klass();
- instanceKlass::cast(d)->set_is_marked_dependent(false);
+ instanceKlass::cast(d)->clear_is_marked_dependent();
}
}
diff --git a/src/share/vm/oops/instanceKlass.cpp b/src/share/vm/oops/instanceKlass.cpp
index 6a446b775..92909c660 100644
--- a/src/share/vm/oops/instanceKlass.cpp
+++ b/src/share/vm/oops/instanceKlass.cpp
@@ -110,7 +110,7 @@ bool instanceKlass::verify_code(
// 1) Verify the bytecodes
Verifier::Mode mode =
throw_verifyerror ? Verifier::ThrowException : Verifier::NoException;
- return Verifier::verify(this_oop, mode, CHECK_false);
+ return Verifier::verify(this_oop, mode, this_oop->should_verify_class(), CHECK_false);
}
diff --git a/src/share/vm/oops/instanceKlass.hpp b/src/share/vm/oops/instanceKlass.hpp
index c21398731..10e5af96b 100644
--- a/src/share/vm/oops/instanceKlass.hpp
+++ b/src/share/vm/oops/instanceKlass.hpp
@@ -114,6 +114,15 @@ class instanceKlass: public Klass {
initialization_error // error happened during initialization
};
+ // smaller footprint for boolean flags
+ enum ClassFlags {
+ _noflags = 0, // initial value
+ _rewritten = 0x00000001U, // rewritten
+ _should_verify = 0x00000002U, // defineClass specified conditional verification
+ _has_nonstatic_fields = 0x00000004U, // for sizing with UseCompressedOops
+ _is_marked_dependent = 0x00000008U // used for marking during flushing and deoptimization
+ };
+
public:
oop* oop_block_beg() const { return adr_array_klasses(); }
oop* oop_block_end() const { return adr_methods_default_annotations() + 1; }
@@ -192,9 +201,7 @@ class instanceKlass: public Klass {
int _static_field_size; // number words used by static fields (oop and non-oop) in this klass
int _static_oop_field_size;// number of static oop fields in this klass
int _nonstatic_oop_map_size;// number of nonstatic oop-map blocks allocated at end of this klass
- bool _is_marked_dependent; // used for marking during flushing and deoptimization
- bool _rewritten; // methods rewritten.
- bool _has_nonstatic_fields; // for sizing with UseCompressedOops
+ int _class_flags; // internal class state flags
u2 _minor_version; // minor version number of class file
u2 _major_version; // major version number of class file
ClassState _init_state; // state of class
@@ -230,8 +237,8 @@ class instanceKlass: public Klass {
friend class SystemDictionary;
public:
- bool has_nonstatic_fields() const { return _has_nonstatic_fields; }
- void set_has_nonstatic_fields(bool b) { _has_nonstatic_fields = b; }
+ bool has_nonstatic_fields() const { return (_class_flags & _has_nonstatic_fields) != 0; }
+ void set_has_nonstatic_fields() { _class_flags |= _has_nonstatic_fields; }
// field sizes
int nonstatic_field_size() const { return _nonstatic_field_size; }
@@ -338,11 +345,16 @@ class instanceKlass: public Klass {
bool is_in_error_state() const { return _init_state == initialization_error; }
bool is_reentrant_initialization(Thread *thread) { return thread == _init_thread; }
int get_init_state() { return _init_state; } // Useful for debugging
- bool is_rewritten() const { return _rewritten; }
+ bool is_rewritten() const { return (_class_flags & _rewritten) != 0; }
+
+ // defineClass specified verification
+ bool should_verify_class() const { return (_class_flags & _should_verify) != 0; }
+ void set_should_verify_class() { _class_flags |= _should_verify; }
// marking
- bool is_marked_dependent() const { return _is_marked_dependent; }
- void set_is_marked_dependent(bool value) { _is_marked_dependent = value; }
+ bool is_marked_dependent() const { return (_class_flags & _is_marked_dependent) != 0; }
+ void set_is_marked_dependent() { _class_flags |= _is_marked_dependent; }
+ void clear_is_marked_dependent() { _class_flags &= ~_is_marked_dependent; }
// initialization (virtuals from Klass)
bool should_be_initialized() const; // means that initialize should be called
@@ -715,7 +727,8 @@ private:
#else
void set_init_state(ClassState state) { _init_state = state; }
#endif
- void set_rewritten() { _rewritten = true; }
+ void clear_class_flags() { _class_flags = _noflags; }
+ void set_rewritten() { _class_flags |= _rewritten; }
void set_init_thread(Thread *thread) { _init_thread = thread; }
u2 idnum_allocated_count() const { return _idnum_allocated_count; }
diff --git a/src/share/vm/oops/instanceKlassKlass.cpp b/src/share/vm/oops/instanceKlassKlass.cpp
index aae1b1bf1..ec1901ede 100644
--- a/src/share/vm/oops/instanceKlassKlass.cpp
+++ b/src/share/vm/oops/instanceKlassKlass.cpp
@@ -450,9 +450,9 @@ klassOop instanceKlassKlass::allocate_instance_klass(int vtable_len, int itable_
ik->set_inner_classes(NULL);
ik->set_static_oop_field_size(0);
ik->set_nonstatic_field_size(0);
- ik->set_is_marked_dependent(false);
ik->set_init_state(instanceKlass::allocated);
ik->set_init_thread(NULL);
+ ik->clear_class_flags();
ik->set_reference_type(rt);
ik->set_oop_map_cache(NULL);
ik->set_jni_ids(NULL);
diff --git a/src/share/vm/prims/jni.cpp b/src/share/vm/prims/jni.cpp
index bde5dba77..2bba3e0af 100644
--- a/src/share/vm/prims/jni.cpp
+++ b/src/share/vm/prims/jni.cpp
@@ -299,7 +299,8 @@ JNI_ENTRY(jclass, jni_DefineClass(JNIEnv *env, const char *name, jobject loaderR
}
}
klassOop k = SystemDictionary::resolve_from_stream(class_name, class_loader,
- Handle(), &st, CHECK_NULL);
+ Handle(), &st, true,
+ CHECK_NULL);
if (TraceClassResolution && k != NULL) {
trace_class_resolution(k);
diff --git a/src/share/vm/prims/jvm.cpp b/src/share/vm/prims/jvm.cpp
index 3e2e38246..36c6507ee 100644
--- a/src/share/vm/prims/jvm.cpp
+++ b/src/share/vm/prims/jvm.cpp
@@ -762,7 +762,11 @@ static void is_lock_held_by_thread(Handle loader, PerfCounter* counter, TRAPS) {
}
// common code for JVM_DefineClass() and JVM_DefineClassWithSource()
-static jclass jvm_define_class_common(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source, TRAPS) {
+// and JVM_DefineClassWithSourceCond()
+static jclass jvm_define_class_common(JNIEnv *env, const char *name,
+ jobject loader, const jbyte *buf,
+ jsize len, jobject pd, const char *source,
+ jboolean verify, TRAPS) {
if (source == NULL) source = "__JVM_DefineClass__";
assert(THREAD->is_Java_thread(), "must be a JavaThread");
@@ -803,6 +807,7 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name, jobject loa
Handle protection_domain (THREAD, JNIHandles::resolve(pd));
klassOop k = SystemDictionary::resolve_from_stream(class_name, class_loader,
protection_domain, &st,
+ verify != 0,
CHECK_NULL);
if (TraceClassResolution && k != NULL) {
@@ -816,16 +821,24 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name, jobject loa
JVM_ENTRY(jclass, JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd))
JVMWrapper2("JVM_DefineClass %s", name);
- return jvm_define_class_common(env, name, loader, buf, len, pd, NULL, THREAD);
+ return jvm_define_class_common(env, name, loader, buf, len, pd, NULL, true, THREAD);
JVM_END
JVM_ENTRY(jclass, JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source))
JVMWrapper2("JVM_DefineClassWithSource %s", name);
- return jvm_define_class_common(env, name, loader, buf, len, pd, source, THREAD);
+ return jvm_define_class_common(env, name, loader, buf, len, pd, source, true, THREAD);
JVM_END
+JVM_ENTRY(jclass, JVM_DefineClassWithSourceCond(JNIEnv *env, const char *name,
+ jobject loader, const jbyte *buf,
+ jsize len, jobject pd,
+ const char *source, jboolean verify))
+ JVMWrapper2("JVM_DefineClassWithSourceCond %s", name);
+
+ return jvm_define_class_common(env, name, loader, buf, len, pd, source, verify, THREAD);
+JVM_END
JVM_ENTRY(jclass, JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name))
JVMWrapper("JVM_FindLoadedClass");
diff --git a/src/share/vm/prims/jvm.h b/src/share/vm/prims/jvm.h
index fea96ee4a..2ab9d5800 100644
--- a/src/share/vm/prims/jvm.h
+++ b/src/share/vm/prims/jvm.h
@@ -417,6 +417,17 @@ JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader,
const jbyte *buf, jsize len, jobject pd,
const char *source);
+/* Define a class with a source with conditional verification (added HSX 14)
+ * -Xverify:all will verify anyway, -Xverify:none will not verify,
+ * -Xverify:remote (default) will obey this conditional
+ * i.e. true = should_verify_class
+ */
+JNIEXPORT jclass JNICALL
+JVM_DefineClassWithSourceCond(JNIEnv *env, const char *name,
+ jobject loader, const jbyte *buf,
+ jsize len, jobject pd, const char *source,
+ jboolean verify);
+
/* Define a class with a source (MLVM) */
JNIEXPORT jclass JNICALL
JVM_DefineClassWithCP(JNIEnv *env, const char *name, jobject loader,
diff --git a/src/share/vm/prims/jvmtiRedefineClasses.cpp b/src/share/vm/prims/jvmtiRedefineClasses.cpp
index ba9b1d877..a2a888c33 100644
--- a/src/share/vm/prims/jvmtiRedefineClasses.cpp
+++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp
@@ -933,7 +933,7 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
// description.
RedefineVerifyMark rvm(&the_class, &scratch_class, state);
Verifier::verify(
- scratch_class, Verifier::ThrowException, THREAD);
+ scratch_class, Verifier::ThrowException, true, THREAD);
}
if (HAS_PENDING_EXCEPTION) {
@@ -959,7 +959,7 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
// verify what we have done during constant pool merging
{
RedefineVerifyMark rvm(&the_class, &scratch_class, state);
- Verifier::verify(scratch_class, Verifier::ThrowException, THREAD);
+ Verifier::verify(scratch_class, Verifier::ThrowException, true, THREAD);
}
if (HAS_PENDING_EXCEPTION) {
diff --git a/src/share/vm/runtime/vmStructs.cpp b/src/share/vm/runtime/vmStructs.cpp
index 00dac5885..d262a86d0 100644
--- a/src/share/vm/runtime/vmStructs.cpp
+++ b/src/share/vm/runtime/vmStructs.cpp
@@ -108,7 +108,7 @@ static inline uint64_t cast_uint64_t(size_t x)
nonstatic_field(instanceKlass, _static_field_size, int) \
nonstatic_field(instanceKlass, _static_oop_field_size, int) \
nonstatic_field(instanceKlass, _nonstatic_oop_map_size, int) \
- nonstatic_field(instanceKlass, _is_marked_dependent, bool) \
+ nonstatic_field(instanceKlass, _class_flags, int) \
nonstatic_field(instanceKlass, _minor_version, u2) \
nonstatic_field(instanceKlass, _major_version, u2) \
nonstatic_field(instanceKlass, _init_state, instanceKlass::ClassState) \
@@ -1245,6 +1245,7 @@ static inline uint64_t cast_uint64_t(size_t x)
declare_integer_type(Bytecodes::Code) \
declare_integer_type(Generation::Name) \
declare_integer_type(instanceKlass::ClassState) \
+ declare_integer_type(instanceKlass::ClassFlags) \
declare_integer_type(JavaThreadState) \
declare_integer_type(Location::Type) \
declare_integer_type(Location::Where) \
@@ -1526,6 +1527,16 @@ static inline uint64_t cast_uint64_t(size_t x)
declare_constant(instanceKlass::initialization_error) \
\
/*********************************/ \
+ /* instanceKlass ClassFlags enum */ \
+ /*********************************/ \
+ \
+ declare_constant(instanceKlass::_noflags) \
+ declare_constant(instanceKlass::_rewritten) \
+ declare_constant(instanceKlass::_should_verify) \
+ declare_constant(instanceKlass::_has_nonstatic_fields) \
+ declare_constant(instanceKlass::_is_marked_dependent) \
+ \
+ /*********************************/ \
/* symbolOop - symbol max length */ \
/*********************************/ \
\