--- a/src/hotspot/share/code/compiledMethod.cpp Thu May 03 08:07:20 2018 -0400
+++ b/src/hotspot/share/code/compiledMethod.cpp Fri Apr 27 15:00:04 2018 -0400
@@ -389,22 +389,24 @@
void CompiledMethod::clean_ic_if_metadata_is_dead(CompiledIC *ic) {
if (ic->is_icholder_call()) {
- // The only exception is compiledICHolder oops which may
+ // The only exception is compiledICHolder metdata which may
// yet be marked below. (We check this further below).
- CompiledICHolder* cichk_oop = ic->cached_icholder();
+ CompiledICHolder* cichk_metdata = ic->cached_icholder();
- if (cichk_oop->is_loader_alive()) {
+ if (cichk_metdata->is_loader_alive()) {
return;
}
} else {
- Metadata* ic_oop = ic->cached_metadata();
- if (ic_oop != NULL) {
- if (ic_oop->is_klass()) {
- if (((Klass*)ic_oop)->is_loader_alive()) {
+ Metadata* ic_metdata = ic->cached_metadata();
+ if (ic_metdata != NULL) {
+ if (ic_metdata->is_klass()) {
+ if (((Klass*)ic_metdata)->is_loader_alive()) {
return;
}
- } else if (ic_oop->is_method()) {
- if (((Method*)ic_oop)->method_holder()->is_loader_alive()) {
+ } else if (ic_metdata->is_method()) {
+ Method* method = (Method*)ic_metdata;
+ assert(!method->is_old(), "old method should have been cleaned");
+ if (method->method_holder()->is_loader_alive()) {
return;
}
} else {
@@ -493,16 +495,6 @@
// (See comment above.)
}
- // The RedefineClasses() API can cause the class unloading invariant
- // to no longer be true. See jvmtiExport.hpp for details.
- // Also, leave a debugging breadcrumb in local flag.
- if (JvmtiExport::has_redefined_a_class()) {
- // This set of the unloading_occurred flag is done before the
- // call to post_compiled_method_unload() so that the unloading
- // of this nmethod is reported.
- unloading_occurred = true;
- }
-
// Exception cache
clean_exception_cache();
@@ -581,16 +573,6 @@
// (See comment above.)
}
- // The RedefineClasses() API can cause the class unloading invariant
- // to no longer be true. See jvmtiExport.hpp for details.
- // Also, leave a debugging breadcrumb in local flag.
- if (JvmtiExport::has_redefined_a_class()) {
- // This set of the unloading_occurred flag is done before the
- // call to post_compiled_method_unload() so that the unloading
- // of this nmethod is reported.
- unloading_occurred = true;
- }
-
// Exception cache
clean_exception_cache();