Top


定義場所(file name)

hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp

説明(description)

// This method is used by System.gc() and JVMTI.

名前(function name)

void ParallelScavengeHeap::collect(GCCause::Cause cause) {

本体部(body)

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(!Heap_lock->owned_by_self(),
        "this thread should not own the Heap_lock");

  {- -------------------------------------------
  (1) (変数宣言など)
      ---------------------------------------- -}

      unsigned int gc_count      = 0;
      unsigned int full_gc_count = 0;
      {
        MutexLocker ml(Heap_lock);
        // This value is guarded by the Heap_lock
        gc_count      = Universe::heap()->total_collections();
        full_gc_count = Universe::heap()->total_full_collections();
      }

  {- -------------------------------------------
  (1) VM_ParallelGCSystemGC を実行する.
      ---------------------------------------- -}

      VM_ParallelGCSystemGC op(gc_count, full_gc_count, cause);
      VMThread::execute(&op);
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.