This commit is contained in:
Niclas Adlertz 2013-09-05 10:39:10 +02:00
commit a0a141a9d9
60 changed files with 1114 additions and 554 deletions

View file

@ -93,18 +93,21 @@ HS_DTRACE_PROBE_DECL6(hotspot, compiled__method__unload,
#endif
bool nmethod::is_compiled_by_c1() const {
if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing
if (is_native_method()) return false;
if (compiler() == NULL) {
return false;
}
return compiler()->is_c1();
}
bool nmethod::is_compiled_by_c2() const {
if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing
if (is_native_method()) return false;
if (compiler() == NULL) {
return false;
}
return compiler()->is_c2();
}
bool nmethod::is_compiled_by_shark() const {
if (is_native_method()) return false;
assert(compiler() != NULL, "must be");
if (compiler() == NULL) {
return false;
}
return compiler()->is_shark();
}
@ -1401,6 +1404,9 @@ bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
// nmethods aren't scanned for GC.
_oops_are_stale = true;
#endif
// the Method may be reclaimed by class unloading now that the
// nmethod is in zombie state
set_method(NULL);
} else {
assert(state == not_entrant, "other cases may need to be handled differently");
}