487 virtual void verify_nmethod(nmethod* nm) = 0;
488
489 void trace_heap_before_gc(const GCTracer* gc_tracer);
490 void trace_heap_after_gc(const GCTracer* gc_tracer);
491
492 // Heap verification
493 virtual void verify(VerifyOption option) = 0;
494
495 // Return true if concurrent gc control via WhiteBox is supported by
496 // this collector. The default implementation returns false.
497 virtual bool supports_concurrent_gc_breakpoints() const;
498
499 // Provides a thread pool to SafepointSynchronize to use
500 // for parallel safepoint cleanup.
501 // GCs that use a GC worker thread pool may want to share
502 // it for use during safepoint cleanup. This is only possible
503 // if the GC can pause and resume concurrent work (e.g. G1
504 // concurrent marking) for an intermittent non-GC safepoint.
505 // If this method returns NULL, SafepointSynchronize will
506 // perform cleanup tasks serially in the VMThread.
507 virtual WorkGang* get_safepoint_workers() { return NULL; }
508
509 // Support for object pinning. This is used by JNI Get*Critical()
510 // and Release*Critical() family of functions. If supported, the GC
511 // must guarantee that pinned objects never move.
512 virtual bool supports_object_pinning() const;
513 virtual oop pin_object(JavaThread* thread, oop obj);
514 virtual void unpin_object(JavaThread* thread, oop obj);
515
516 // Deduplicate the string, iff the GC supports string deduplication.
517 virtual void deduplicate_string(oop str);
518
519 virtual bool is_oop(oop object) const;
520
521 // Non product verification and debugging.
522 #ifndef PRODUCT
523 // Support for PromotionFailureALot. Return true if it's time to cause a
524 // promotion failure. The no-argument version uses
525 // this->_promotion_failure_alot_count as the counter.
526 bool promotion_should_fail(volatile size_t* count);
527 bool promotion_should_fail();
|
487 virtual void verify_nmethod(nmethod* nm) = 0;
488
489 void trace_heap_before_gc(const GCTracer* gc_tracer);
490 void trace_heap_after_gc(const GCTracer* gc_tracer);
491
492 // Heap verification
493 virtual void verify(VerifyOption option) = 0;
494
495 // Return true if concurrent gc control via WhiteBox is supported by
496 // this collector. The default implementation returns false.
497 virtual bool supports_concurrent_gc_breakpoints() const;
498
499 // Provides a thread pool to SafepointSynchronize to use
500 // for parallel safepoint cleanup.
501 // GCs that use a GC worker thread pool may want to share
502 // it for use during safepoint cleanup. This is only possible
503 // if the GC can pause and resume concurrent work (e.g. G1
504 // concurrent marking) for an intermittent non-GC safepoint.
505 // If this method returns NULL, SafepointSynchronize will
506 // perform cleanup tasks serially in the VMThread.
507 virtual WorkGang* safepoint_workers() { return NULL; }
508
509 // Support for object pinning. This is used by JNI Get*Critical()
510 // and Release*Critical() family of functions. If supported, the GC
511 // must guarantee that pinned objects never move.
512 virtual bool supports_object_pinning() const;
513 virtual oop pin_object(JavaThread* thread, oop obj);
514 virtual void unpin_object(JavaThread* thread, oop obj);
515
516 // Deduplicate the string, iff the GC supports string deduplication.
517 virtual void deduplicate_string(oop str);
518
519 virtual bool is_oop(oop object) const;
520
521 // Non product verification and debugging.
522 #ifndef PRODUCT
523 // Support for PromotionFailureALot. Return true if it's time to cause a
524 // promotion failure. The no-argument version uses
525 // this->_promotion_failure_alot_count as the counter.
526 bool promotion_should_fail(volatile size_t* count);
527 bool promotion_should_fail();
|