8358339: Handle MethodCounters::_method backlinks after JDK-8355003
Reviewed-by: coleenp, kvn, iveresov
This commit is contained in:
parent
77c110c309
commit
3cf3e4bbec
@ -29,6 +29,7 @@
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "oops/klass.inline.hpp"
|
||||
#include "oops/methodCounters.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
@ -537,6 +538,9 @@ void CodeBuffer::finalize_oop_references(const methodHandle& mh) {
|
||||
if (m->is_methodData()) {
|
||||
m = ((MethodData*)m)->method();
|
||||
}
|
||||
if (m->is_methodCounters()) {
|
||||
m = ((MethodCounters*)m)->method();
|
||||
}
|
||||
if (m->is_method()) {
|
||||
m = ((Method*)m)->method_holder();
|
||||
}
|
||||
@ -561,6 +565,9 @@ void CodeBuffer::finalize_oop_references(const methodHandle& mh) {
|
||||
if (m->is_methodData()) {
|
||||
m = ((MethodData*)m)->method();
|
||||
}
|
||||
if (m->is_methodCounters()) {
|
||||
m = ((MethodCounters*)m)->method();
|
||||
}
|
||||
if (m->is_method()) {
|
||||
m = ((Method*)m)->method_holder();
|
||||
}
|
||||
|
@ -788,6 +788,8 @@ class CheckClass : public MetadataClosure {
|
||||
klass = ((Method*)md)->method_holder();
|
||||
} else if (md->is_methodData()) {
|
||||
klass = ((MethodData*)md)->method()->method_holder();
|
||||
} else if (md->is_methodCounters()) {
|
||||
klass = ((MethodCounters*)md)->method()->method_holder();
|
||||
} else {
|
||||
md->print();
|
||||
ShouldNotReachHere();
|
||||
|
@ -44,6 +44,7 @@ class Metadata : public MetaspaceObj {
|
||||
virtual bool is_method() const { return false; }
|
||||
virtual bool is_methodData() const { return false; }
|
||||
virtual bool is_constantPool() const { return false; }
|
||||
virtual bool is_methodCounters() const { return false; }
|
||||
virtual int size() const = 0;
|
||||
virtual MetaspaceObj::Type type() const = 0;
|
||||
virtual const char* internal_name() const = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user