-
Enhancement
-
Resolution: Fixed
-
P4
-
8u20, 9
-
b36
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8083099 | emb-9 | Aleksey Shipilev | P4 | Resolved | Fixed | b36 |
On Unsafe.defineAnonymousClass-intensive benchmarks, you can see this branch in profiler:
5.794 (12%) InstanceKlass::link_class(Thread*)
1.141 (2%) Verifier::verify(instanceKlassHandle,Verifier::Mode,bool,Thread*)
0.841 (2%) Klass::external_name()const
Anonymous classes are not verified, but we do useless work before checking for that with is_eligible_for_verification:
101 Symbol* exception_name = NULL;
102 const size_t message_buffer_len = klass->name()->utf8_length() + 1024;
103 char* message_buffer = NEW_RESOURCE_ARRAY(char, message_buffer_len);
104 char* exception_message = message_buffer;
105
106 const char* klassName = klass->external_name();
107 bool can_failover = FailOverToOldVerifier &&
108 klass->major_version() < NOFAILOVER_MAJOR_VERSION;
109
110 // If the class should be verified, first see if we can use the split
111 // verifier. If not, or if verification fails and FailOverToOldVerifier
112 // is set, then call the inference verifier.
113 if (is_eligible_for_verification(klass, should_verify_class)) {
5.794 (12%) InstanceKlass::link_class(Thread*)
1.141 (2%) Verifier::verify(instanceKlassHandle,Verifier::Mode,bool,Thread*)
0.841 (2%) Klass::external_name()const
Anonymous classes are not verified, but we do useless work before checking for that with is_eligible_for_verification:
101 Symbol* exception_name = NULL;
102 const size_t message_buffer_len = klass->name()->utf8_length() + 1024;
103 char* message_buffer = NEW_RESOURCE_ARRAY(char, message_buffer_len);
104 char* exception_message = message_buffer;
105
106 const char* klassName = klass->external_name();
107 bool can_failover = FailOverToOldVerifier &&
108 klass->major_version() < NOFAILOVER_MAJOR_VERSION;
109
110 // If the class should be verified, first see if we can use the split
111 // verifier. If not, or if verification fails and FailOverToOldVerifier
112 // is set, then call the inference verifier.
113 if (is_eligible_for_verification(klass, should_verify_class)) {
- backported by
-
JDK-8083099 Verifier::verify is wasting time before is_eligible_for_verification check
-
- Resolved
-
- relates to
-
JDK-8059924 com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java: assert(Universe::verify_in_progress() || !SafepointSynchronize::is_at_safepoint()) failed: invariant
-
- Closed
-