当前位置: 首页>>代码示例>>C++>>正文


C++ HeapRegionRemSet类代码示例

本文整理汇总了C++中HeapRegionRemSet的典型用法代码示例。如果您正苦于以下问题:C++ HeapRegionRemSet类的具体用法?C++ HeapRegionRemSet怎么用?C++ HeapRegionRemSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了HeapRegionRemSet类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: set_young_index_in_cset

void HeapRegion::hr_clear(bool par, bool clear_space) {
  _humongous_type = NotHumongous;
  _humongous_start_region = NULL;
  _in_collection_set = false;
  _is_gc_alloc_region = false;

  // Age stuff (if parallel, this will be done separately, since it needs
  // to be sequential).
  G1CollectedHeap* g1h = G1CollectedHeap::heap();

  set_young_index_in_cset(-1);
  uninstall_surv_rate_group();
  set_young_type(NotYoung);

  // In case it had been the start of a humongous sequence, reset its end.
  set_end(_orig_end);

  if (!par) {
    // If this is parallel, this will be done later.
    HeapRegionRemSet* hrrs = rem_set();
    if (hrrs != NULL) hrrs->clear();
    _claimed = InitialClaimValue;
  }
  zero_marked_bytes();
  set_sort_index(-1);

  _offsets.resize(HeapRegion::GrainWords);
  init_top_at_mark_start();
  if (clear_space) clear(SpaceDecorator::Mangle);
}
开发者ID:BaHbKaTX,项目名称:openjdk,代码行数:30,代码来源:heapRegion.cpp

示例2: assert

void HeapRegion::hr_clear(bool par, bool clear_space, bool locked) {
  assert(_humongous_type == NotHumongous,
         "we should have already filtered out humongous regions");
  assert(_humongous_start_region == NULL,
         "we should have already filtered out humongous regions");
  assert(_end == _orig_end,
         "we should have already filtered out humongous regions");

  _in_collection_set = false;

  set_young_index_in_cset(-1);
  uninstall_surv_rate_group();
  set_young_type(NotYoung);
  reset_pre_dummy_top();

  if (!par) {
    // If this is parallel, this will be done later.
    HeapRegionRemSet* hrrs = rem_set();
    if (locked) {
      hrrs->clear_locked();
    } else {
      hrrs->clear();
    }
    _claimed = InitialClaimValue;
  }
  zero_marked_bytes();

  _offsets.resize(HeapRegion::GrainWords);
  init_top_at_mark_start();
  if (clear_space) clear(SpaceDecorator::Mangle);
}
开发者ID:BunnyWei,项目名称:truffle-llvmir,代码行数:31,代码来源:heapRegion.cpp

示例3: doHeapRegion

 bool doHeapRegion(HeapRegion* r) {
   HeapRegionRemSet* hrrs = r->rem_set();
   _count += (int) hrrs->occupied();
   if (hrrs->occupied() == 0) {
     gclog_or_tty->print("Heap Region [" PTR_FORMAT ", " PTR_FORMAT ") "
                         "has no remset entries\n",
                         r->bottom(), r->end());
   } else {
     gclog_or_tty->print("Printing rem set for heap region [" PTR_FORMAT ", " PTR_FORMAT ")\n",
                         r->bottom(), r->end());
     r->print();
     hrrs->print();
     gclog_or_tty->print("\nDone printing rem set\n");
   }
   return false;
 }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例4: doHeapRegion

  bool doHeapRegion(HeapRegion* r) {
    assert(r->in_collection_set(), "should only be called on elements of CS.");
    HeapRegionRemSet* hrrs = r->rem_set();
    if (hrrs->iter_is_complete()) return false; // All done.
    if (!_try_claimed && !hrrs->claim_iter()) return false;
    // If we ever free the collection set concurrently, we should also
    // clear the card table concurrently therefore we won't need to
    // add regions of the collection set to the dirty cards region.
    _g1h->push_dirty_cards_region(r);
    // If we didn't return above, then
    //   _try_claimed || r->claim_iter()
    // is true: either we're supposed to work on claimed-but-not-complete
    // regions, or we successfully claimed the region.

    HeapRegionRemSetIterator iter(hrrs);
    size_t card_index;

    // We claim cards in block so as to reduce the contention. The block size is determined by
    // the G1RSetScanBlockSize parameter.
    size_t jump_to_card = hrrs->iter_claimed_next(_block_size);
    for (size_t current_card = 0; iter.has_next(card_index); current_card++) {
      if (current_card >= jump_to_card + _block_size) {
        jump_to_card = hrrs->iter_claimed_next(_block_size);
      }
      if (current_card < jump_to_card) continue;
      HeapWord* card_start = _g1h->bot_shared()->address_for_index(card_index);
#if 0
      gclog_or_tty->print("Rem set iteration yielded card [" PTR_FORMAT ", " PTR_FORMAT ").\n",
                          card_start, card_start + CardTableModRefBS::card_size_in_words);
#endif

      HeapRegion* card_region = _g1h->heap_region_containing(card_start);
      _cards++;

      if (!card_region->is_on_dirty_cards_region_list()) {
        _g1h->push_dirty_cards_region(card_region);
      }

      // If the card is dirty, then we will scan it during updateRS.
      if (!card_region->in_collection_set() &&
          !_ct_bs->is_card_dirty(card_index)) {
        scanCard(card_index, card_region);
      }
    }
    if (!_try_claimed) {
      // Scan the strong code root list attached to the current region
      scan_strong_code_roots(r);

      hrrs->set_iter_complete();
    }
    return false;
  }
开发者ID:netroby,项目名称:jdk9-shenandoah-hotspot,代码行数:52,代码来源:g1RemSet.cpp

示例5: rem_set

void HeapRegion::strong_code_roots_do(CodeBlobClosure* blk) const {
  HeapRegionRemSet* hrrs = rem_set();
  hrrs->strong_code_roots_do(blk);
}
开发者ID:BunnyWei,项目名称:truffle-llvmir,代码行数:4,代码来源:heapRegion.cpp

示例6: assert_locked_or_safepoint

void HeapRegion::add_strong_code_root_locked(nmethod* nm) {
  assert_locked_or_safepoint(CodeCache_lock);
  HeapRegionRemSet* hrrs = rem_set();
  hrrs->add_strong_code_root_locked(nm);
}
开发者ID:aristofanio,项目名称:jdk8u-jdk8u-hotspot,代码行数:5,代码来源:heapRegion.cpp


注:本文中的HeapRegionRemSet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。