mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8220610: Make CollectedHeap nmethod functions pure virtual
Reviewed-by: shade
This commit is contained in:
parent
0b2e2ca9bd
commit
abb2d67803
4 changed files with 19 additions and 5 deletions
|
@ -129,6 +129,12 @@ public:
|
||||||
virtual void print_gc_threads_on(outputStream* st) const {}
|
virtual void print_gc_threads_on(outputStream* st) const {}
|
||||||
virtual void gc_threads_do(ThreadClosure* tc) const {}
|
virtual void gc_threads_do(ThreadClosure* tc) const {}
|
||||||
|
|
||||||
|
// No nmethod handling
|
||||||
|
virtual void register_nmethod(nmethod* nm) {}
|
||||||
|
virtual void unregister_nmethod(nmethod* nm) {}
|
||||||
|
virtual void flush_nmethod(nmethod* nm) {}
|
||||||
|
virtual void verify_nmethod(nmethod* nm) {}
|
||||||
|
|
||||||
// No heap verification
|
// No heap verification
|
||||||
virtual void prepare_for_verify() {}
|
virtual void prepare_for_verify() {}
|
||||||
virtual void verify(VerifyOption option) {}
|
virtual void verify(VerifyOption option) {}
|
||||||
|
|
|
@ -1322,6 +1322,12 @@ public:
|
||||||
// Unregister the given nmethod from the G1 heap.
|
// Unregister the given nmethod from the G1 heap.
|
||||||
virtual void unregister_nmethod(nmethod* nm);
|
virtual void unregister_nmethod(nmethod* nm);
|
||||||
|
|
||||||
|
// No nmethod flushing needed.
|
||||||
|
virtual void flush_nmethod(nmethod* nm) {}
|
||||||
|
|
||||||
|
// No nmethod verification implemented.
|
||||||
|
virtual void verify_nmethod(nmethod* nm) {}
|
||||||
|
|
||||||
// Free up superfluous code root memory.
|
// Free up superfluous code root memory.
|
||||||
void purge_code_root_memory();
|
void purge_code_root_memory();
|
||||||
|
|
||||||
|
|
|
@ -510,11 +510,11 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||||
void print_heap_after_gc();
|
void print_heap_after_gc();
|
||||||
|
|
||||||
// Registering and unregistering an nmethod (compiled code) with the heap.
|
// Registering and unregistering an nmethod (compiled code) with the heap.
|
||||||
// Override with specific mechanism for each specialized heap type.
|
virtual void register_nmethod(nmethod* nm) = 0;
|
||||||
virtual void register_nmethod(nmethod* nm) {}
|
virtual void unregister_nmethod(nmethod* nm) = 0;
|
||||||
virtual void unregister_nmethod(nmethod* nm) {}
|
// Callback for when nmethod is about to be deleted.
|
||||||
virtual void flush_nmethod(nmethod* nm) {}
|
virtual void flush_nmethod(nmethod* nm) = 0;
|
||||||
virtual void verify_nmethod(nmethod* nmethod) {}
|
virtual void verify_nmethod(nmethod* nm) = 0;
|
||||||
|
|
||||||
void trace_heap_before_gc(const GCTracer* gc_tracer);
|
void trace_heap_before_gc(const GCTracer* gc_tracer);
|
||||||
void trace_heap_after_gc(const GCTracer* gc_tracer);
|
void trace_heap_after_gc(const GCTracer* gc_tracer);
|
||||||
|
|
|
@ -584,6 +584,8 @@ public:
|
||||||
public:
|
public:
|
||||||
void register_nmethod(nmethod* nm);
|
void register_nmethod(nmethod* nm);
|
||||||
void unregister_nmethod(nmethod* nm);
|
void unregister_nmethod(nmethod* nm);
|
||||||
|
void flush_nmethod(nmethod* nm) {}
|
||||||
|
void verify_nmethod(nmethod* nm) {}
|
||||||
|
|
||||||
// ---------- Pinning hooks
|
// ---------- Pinning hooks
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue