Skip to content

Commit

Permalink
8288360: CI: ciInstanceKlass::implementor() is not consistent for wel…
Browse files Browse the repository at this point in the history
…l-known classes

Backport-of: 50f99c3208fc9f479cc109fb6e73d262e27026a2
  • Loading branch information
GoeLin committed Jul 21, 2022
1 parent 9d8e388 commit 517a18e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/hotspot/share/ci/ciInstanceKlass.cpp
Expand Up @@ -601,8 +601,10 @@ bool ciInstanceKlass::is_leaf_type() {
ciInstanceKlass* ciInstanceKlass::implementor() {
ciInstanceKlass* impl = _implementor;
if (impl == NULL) {
// Go into the VM to fetch the implementor.
{
if (is_shared()) {
impl = this; // assume a well-known interface never has a unique implementor
} else {
// Go into the VM to fetch the implementor.
VM_ENTRY_MARK;
MutexLocker ml(Compile_lock);
Klass* k = get_instanceKlass()->implementor();
Expand All @@ -616,9 +618,7 @@ ciInstanceKlass* ciInstanceKlass::implementor() {
}
}
// Memoize this result.
if (!is_shared()) {
_implementor = impl;
}
_implementor = impl;
}
return impl;
}
Expand Down

1 comment on commit 517a18e

@openjdk-notifier
Copy link

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.