453
454 // Does this heap support heap inspection (+PrintClassHistogram?)
455 virtual bool supports_heap_inspection() const = 0;
456
457 // Perform a collection of the heap; intended for use in implementing
458 // "System.gc". This probably implies as full a collection as the
459 // "CollectedHeap" supports.
460 virtual void collect(GCCause::Cause cause) = 0;
461
462 // Perform a full collection
463 virtual void do_full_collection(bool clear_all_soft_refs) = 0;
464
465 // This interface assumes that it's being called by the
466 // vm thread. It collects the heap assuming that the
467 // heap lock is already held and that we are executing in
468 // the context of the vm thread.
469 virtual void collect_as_vm_thread(GCCause::Cause cause);
470
471 // Returns the barrier set for this heap
472 BarrierSet* barrier_set() { return _barrier_set; }
473
474 // Returns "true" iff there is a stop-world GC in progress. (I assume
475 // that it should answer "false" for the concurrent part of a concurrent
476 // collector -- dld).
477 bool is_gc_active() const { return _is_gc_active; }
478
479 // Total number of GC collections (started)
480 unsigned int total_collections() const { return _total_collections; }
481 unsigned int total_full_collections() const { return _total_full_collections;}
482
483 // Increment total number of GC collections (started)
484 // Should be protected but used by PSMarkSweep - cleanup for 1.4.2
485 void increment_total_collections(bool full = false) {
486 _total_collections++;
487 if (full) {
488 increment_total_full_collections();
489 }
490 }
491
492 void increment_total_full_collections() { _total_full_collections++; }
|
453
454 // Does this heap support heap inspection (+PrintClassHistogram?)
455 virtual bool supports_heap_inspection() const = 0;
456
457 // Perform a collection of the heap; intended for use in implementing
458 // "System.gc". This probably implies as full a collection as the
459 // "CollectedHeap" supports.
460 virtual void collect(GCCause::Cause cause) = 0;
461
462 // Perform a full collection
463 virtual void do_full_collection(bool clear_all_soft_refs) = 0;
464
465 // This interface assumes that it's being called by the
466 // vm thread. It collects the heap assuming that the
467 // heap lock is already held and that we are executing in
468 // the context of the vm thread.
469 virtual void collect_as_vm_thread(GCCause::Cause cause);
470
471 // Returns the barrier set for this heap
472 BarrierSet* barrier_set() { return _barrier_set; }
473 void set_barrier_set(BarrierSet* barrier_set);
474
475 // Returns "true" iff there is a stop-world GC in progress. (I assume
476 // that it should answer "false" for the concurrent part of a concurrent
477 // collector -- dld).
478 bool is_gc_active() const { return _is_gc_active; }
479
480 // Total number of GC collections (started)
481 unsigned int total_collections() const { return _total_collections; }
482 unsigned int total_full_collections() const { return _total_full_collections;}
483
484 // Increment total number of GC collections (started)
485 // Should be protected but used by PSMarkSweep - cleanup for 1.4.2
486 void increment_total_collections(bool full = false) {
487 _total_collections++;
488 if (full) {
489 increment_total_full_collections();
490 }
491 }
492
493 void increment_total_full_collections() { _total_full_collections++; }
|