Skip to content
Permalink
Browse files
8258059: Clean up MethodData::profile_unsafe
Reviewed-by: roland, chegar
  • Loading branch information
cl4es committed Dec 11, 2020
1 parent b5592c0 commit ff75ad515bcdabc76d4f9085dfd93e5c419081b7
Showing 1 changed file with 6 additions and 6 deletions.
@@ -1586,12 +1586,12 @@ bool MethodData::profile_jsr292(const methodHandle& m, int bci) {
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::jdk_internal_misc_ScopedMemoryAccess()) {
ResourceMark rm;
char* name = inv.name()->as_C_string();
if (!strncmp(name, "get", 3) || !strncmp(name, "put", 3)) {
Symbol* klass = inv.klass();
if (klass == vmSymbols::jdk_internal_misc_Unsafe() ||
klass == vmSymbols::sun_misc_Unsafe() ||
klass == vmSymbols::jdk_internal_misc_ScopedMemoryAccess()) {
Symbol* name = inv.name();
if (name->starts_with("get") || name->starts_with("put")) {
return true;
}
}

1 comment on commit ff75ad5

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on ff75ad5 Dec 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.