diff -r 66a748c4f3ff -r cf5a438b3c41 src/hotspot/share/oops/methodData.cpp --- a/src/hotspot/share/oops/methodData.cpp Fri Jul 05 11:07:09 2019 +0200 +++ b/src/hotspot/share/oops/methodData.cpp Fri Jul 05 12:55:54 2019 +0300 @@ -1607,11 +1607,14 @@ bool MethodData::profile_unsafe(const methodHandle& m, int bci) { Bytecode_invoke inv(m , bci); - if (inv.is_invokevirtual() && inv.klass() == vmSymbols::jdk_internal_misc_Unsafe()) { - ResourceMark rm; - char* name = inv.name()->as_C_string(); - if (!strncmp(name, "get", 3) || !strncmp(name, "put", 3)) { - return true; + if (inv.is_invokevirtual()) { + if (inv.klass() == vmSymbols::jdk_internal_misc_Unsafe() || + inv.klass() == vmSymbols::sun_misc_Unsafe()) { + ResourceMark rm; + char* name = inv.name()->as_C_string(); + if (!strncmp(name, "get", 3) || !strncmp(name, "put", 3)) { + return true; + } } } return false;