497 498 virtual void print_on_error(outputStream* st) const; 499 500 // Print all GC threads (other than the VM thread) 501 // used by this heap. 502 virtual void print_gc_threads_on(outputStream* st) const = 0; 503 // The default behavior is to call print_gc_threads_on() on tty. 504 void print_gc_threads() { 505 print_gc_threads_on(tty); 506 } 507 // Iterator for all GC threads (other than VM thread) 508 virtual void gc_threads_do(ThreadClosure* tc) const = 0; 509 510 // Print any relevant tracing info that flags imply. 511 // Default implementation does nothing. 512 virtual void print_tracing_info() const = 0; 513 514 void print_heap_before_gc(); 515 void print_heap_after_gc(); 516 517 // An object is scavengable if its location may move during a scavenge. 518 // (A scavenge is a GC which is not a full GC.) 519 virtual bool is_scavengable(oop obj) = 0; 520 // Registering and unregistering an nmethod (compiled code) with the heap. 521 // Override with specific mechanism for each specialized heap type. 522 virtual void register_nmethod(nmethod* nm) {} 523 virtual void unregister_nmethod(nmethod* nm) {} 524 virtual void flush_nmethod(nmethod* nm) {} 525 virtual void verify_nmethod(nmethod* nmethod) {} 526 527 void trace_heap_before_gc(const GCTracer* gc_tracer); 528 void trace_heap_after_gc(const GCTracer* gc_tracer); 529 530 // Heap verification 531 virtual void verify(VerifyOption option) = 0; 532 533 // Return true if concurrent phase control (via 534 // request_concurrent_phase_control) is supported by this collector. 535 // The default implementation returns false. 536 virtual bool supports_concurrent_phase_control() const; 537 538 // Request the collector enter the indicated concurrent phase, and 539 // wait until it does so. Supports WhiteBox testing. Only one | 497 498 virtual void print_on_error(outputStream* st) const; 499 500 // Print all GC threads (other than the VM thread) 501 // used by this heap. 502 virtual void print_gc_threads_on(outputStream* st) const = 0; 503 // The default behavior is to call print_gc_threads_on() on tty. 504 void print_gc_threads() { 505 print_gc_threads_on(tty); 506 } 507 // Iterator for all GC threads (other than VM thread) 508 virtual void gc_threads_do(ThreadClosure* tc) const = 0; 509 510 // Print any relevant tracing info that flags imply. 511 // Default implementation does nothing. 512 virtual void print_tracing_info() const = 0; 513 514 void print_heap_before_gc(); 515 void print_heap_after_gc(); 516 517 // Registering and unregistering an nmethod (compiled code) with the heap. 518 // Override with specific mechanism for each specialized heap type. 519 virtual void register_nmethod(nmethod* nm) {} 520 virtual void unregister_nmethod(nmethod* nm) {} 521 virtual void flush_nmethod(nmethod* nm) {} 522 virtual void verify_nmethod(nmethod* nmethod) {} 523 524 void trace_heap_before_gc(const GCTracer* gc_tracer); 525 void trace_heap_after_gc(const GCTracer* gc_tracer); 526 527 // Heap verification 528 virtual void verify(VerifyOption option) = 0; 529 530 // Return true if concurrent phase control (via 531 // request_concurrent_phase_control) is supported by this collector. 532 // The default implementation returns false. 533 virtual bool supports_concurrent_phase_control() const; 534 535 // Request the collector enter the indicated concurrent phase, and 536 // wait until it does so. Supports WhiteBox testing. Only one |