# HG changeset patch # User Thomas Wuerthinger # Date 1397665200 -7200 # Node ID 62e218478931803f14cecc8d47c9aabfdcdb2db3 # Parent e5265dc8762f420f12f915dded0bd6a4e6533ee5 Fix regression when accessing a Graal installed code object. diff -r e5265dc8762f -r 62e218478931 src/share/vm/code/nmethod.cpp --- a/src/share/vm/code/nmethod.cpp Tue Apr 15 15:31:01 2014 +0200 +++ b/src/share/vm/code/nmethod.cpp Wed Apr 16 18:20:00 2014 +0200 @@ -1738,7 +1738,7 @@ #ifdef GRAAL // Follow Graal method if (_graal_installed_code != NULL) { - if (HotSpotNmethod::isDefault(_graal_installed_code)) { + if (_graal_installed_code->is_a(HotSpotNmethod::klass()) && HotSpotNmethod::isDefault(_graal_installed_code)) { if (!is_alive->do_object_b(_graal_installed_code)) { _graal_installed_code = NULL; } diff -r e5265dc8762f -r 62e218478931 src/share/vm/graal/graalEnv.cpp --- a/src/share/vm/graal/graalEnv.cpp Tue Apr 15 15:31:01 2014 +0200 +++ b/src/share/vm/graal/graalEnv.cpp Wed Apr 16 18:20:00 2014 +0200 @@ -515,7 +515,7 @@ // (Put nm into the task handle *before* publishing to the Java heap.) if (task != NULL) task->set_code(nm); - if (HotSpotNmethod::isDefault(installed_code())) { + if (installed_code->is_a(HotSpotNmethod::klass()) && HotSpotNmethod::isDefault(installed_code())) { if (entry_bci == InvocationEntryBci) { if (TieredCompilation) { // If there is an old version we're done with it