8257837: Performance regression in heap byte buffer views

Reviewed-by: chegar, roland
This commit is contained in:
Maurizio Cimadamore 2020-12-10 15:32:36 +00:00
parent 0890620c94
commit 37043b0557
3 changed files with 121 additions and 1 deletions

View file

@ -1586,7 +1586,8 @@ bool MethodData::profile_unsafe(const methodHandle& m, int bci) {
Bytecode_invoke inv(m , bci);
if (inv.is_invokevirtual()) {
if (inv.klass() == vmSymbols::jdk_internal_misc_Unsafe() ||
inv.klass() == vmSymbols::sun_misc_Unsafe()) {
inv.klass() == vmSymbols::sun_misc_Unsafe() ||
inv.klass() == vmSymbols::jdk_internal_misc_ScopedMemoryAccess()) {
ResourceMark rm;
char* name = inv.name()->as_C_string();
if (!strncmp(name, "get", 3) || !strncmp(name, "put", 3)) {