mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-04 05:00:31 +00:00
8176887: AOT: SIGSEGV in AOTCodeHeap::next when using specific configuration
Derive MethodCounters from Metadata Reviewed-by: kvn, coleenp
This commit is contained in:
parent
9cc73e8656
commit
767a994f9c
@ -47,6 +47,7 @@ class Metadata : public MetaspaceObj {
|
||||
virtual bool is_method() const volatile { return false; }
|
||||
virtual bool is_methodData() const volatile { return false; }
|
||||
virtual bool is_constantPool() const volatile { return false; }
|
||||
virtual bool is_methodCounters() const volatile { return false; }
|
||||
|
||||
virtual const char* internal_name() const = 0;
|
||||
|
||||
|
||||
@ -73,3 +73,11 @@ void MethodCounters::set_highest_osr_comp_level(int level) {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void MethodCounters::print_value_on(outputStream* st) const {
|
||||
assert(is_methodCounters(), "must be methodCounters");
|
||||
st->print("method counters");
|
||||
print_address_on(st);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include "interpreter/invocationCounter.hpp"
|
||||
#include "runtime/arguments.hpp"
|
||||
|
||||
class MethodCounters: public MetaspaceObj {
|
||||
class MethodCounters : public Metadata {
|
||||
friend class VMStructs;
|
||||
friend class JVMCIVMStructs;
|
||||
private:
|
||||
@ -109,10 +109,11 @@ class MethodCounters: public MetaspaceObj {
|
||||
}
|
||||
|
||||
public:
|
||||
virtual bool is_methodCounters() const volatile { return true; }
|
||||
|
||||
static MethodCounters* allocate(methodHandle mh, TRAPS);
|
||||
|
||||
void deallocate_contents(ClassLoaderData* loader_data) {}
|
||||
DEBUG_ONLY(bool on_stack() { return false; }) // for template
|
||||
|
||||
AOT_ONLY(Method* method() const { return _method; })
|
||||
|
||||
@ -120,8 +121,6 @@ class MethodCounters: public MetaspaceObj {
|
||||
return align_size_up(sizeof(MethodCounters), wordSize) / wordSize;
|
||||
}
|
||||
|
||||
bool is_klass() const { return false; }
|
||||
|
||||
void clear_counters();
|
||||
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
@ -253,5 +252,9 @@ class MethodCounters: public MetaspaceObj {
|
||||
static ByteSize backedge_mask_offset() {
|
||||
return byte_offset_of(MethodCounters, _backedge_mask);
|
||||
}
|
||||
|
||||
virtual const char* internal_name() const { return "{method counters}"; }
|
||||
virtual void print_value_on(outputStream* st) const;
|
||||
|
||||
};
|
||||
#endif //SHARE_VM_OOPS_METHODCOUNTERS_HPP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user