Top


定義場所(file name)

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

名前(function name)

void CMTask::get_entries_from_global_stack() {

本体部(body)

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

      // local array where we'll store the entries that will be popped
      // from the global stack.
      oop buffer[global_stack_transfer_size];
      int n;

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

      _cm->mark_stack_pop(buffer, global_stack_transfer_size, &n);

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

      assert(n <= global_stack_transfer_size,
             "we should not pop more than the given limit");

  {- -------------------------------------------
  (1) (assert) (トレース出力) (デバッグ用の処理)
      ---------------------------------------- -}

      if (n > 0) {
        // yes, we did actually pop at least one entry

        statsOnly( ++_global_transfers_from; _global_pops += n );
        if (_cm->verbose_medium())
          gclog_or_tty->print_cr("[%d] popped %d entries from the global stack",
                                 _task_id, n);
        for (int i = 0; i < n; ++i) {
          bool success = _task_queue->push(buffer[i]);
          // We only call this when the local queue is empty or under a
          // given target limit. So, we do not expect this push to fail.
          assert(success, "invariant");
        }

        statsOnly( int tmp_size = _task_queue->size();
                   if (tmp_size > _local_max_size)
                     _local_max_size = tmp_size;
                   _local_pushes += n );
      }

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

      // this operation was quite expensive, so decrease the limits
      decrease_limits();
    }

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