Top


定義場所(file name)

hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

名前(function name)

HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
                                               unsigned int gc_count_before,
                                               bool* succeeded) {

本体部(body)

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

      assert_heap_not_locked_and_not_at_safepoint();

  {- -------------------------------------------
  (1) ?? #TODO
      ---------------------------------------- -}

      g1_policy()->record_stop_world_start();
      VM_G1IncCollectionPause op(gc_count_before,
                                 word_size,
                                 false, /* should_initiate_conc_mark */
                                 g1_policy()->max_pause_time_ms(),
                                 GCCause::_g1_inc_collection_pause);
      VMThread::execute(&op);

      HeapWord* result = op.result();

  {- -------------------------------------------
  (1) 自分が要求を出した GC が実行され (See: prologue_succeeded), かつ
      それが GC_locker によって中断されなかった(See: pause_succeeded)かどうかを調べ,
      引数で渡された succeeded にセットする.
      ---------------------------------------- -}

      bool ret_succeeded = op.prologue_succeeded() && op.pause_succeeded();
      assert(result == NULL || ret_succeeded,
             "the result should be NULL if the VM did not succeed");
      *succeeded = ret_succeeded;

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

      assert_heap_not_locked();

  {- -------------------------------------------
  (1) 結果をリターン
      ---------------------------------------- -}

      return result;
    }

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