Top


定義場所(file name)

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

名前(function name)

void RefProcTaskExecutor::execute(ProcessTask& task)
{

本体部(body)

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

      ParallelScavengeHeap* heap = PSParallelCompact::gc_heap();
      uint parallel_gc_threads = heap->gc_task_manager()->workers();
      RegionTaskQueueSet* qset = ParCompactionManager::region_array();
      ParallelTaskTerminator terminator(parallel_gc_threads, qset);

  {- -------------------------------------------
  (1) GCTaskQueue::create() で GCTaskQueue を作り, 
      そこに ParallelGCThreads 個分だけ RefProcTaskProxy をつめる.
      ---------------------------------------- -}

      GCTaskQueue* q = GCTaskQueue::create();
      for(uint i=0; i<parallel_gc_threads; i++) {
        q->enqueue(new RefProcTaskProxy(task, i));
      }

  {- -------------------------------------------
  (1) さらに, ParallelGCThreads 個分だけ StealMarkingTask を追加.
      ---------------------------------------- -}

      if (task.marks_oops_alive()) {
        if (parallel_gc_threads>1) {
          for (uint j=0; j<parallel_gc_threads; j++) {
            q->enqueue(new StealMarkingTask(&terminator));
          }
        }
      }

  {- -------------------------------------------
  (1) GCTaskManager::execute_and_wait() で, GCTaskThread 達に実行させる.
      ---------------------------------------- -}

      PSParallelCompact::gc_task_manager()->execute_and_wait(q);
    }

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