< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Print this page
rev 50098 : [mq]: 8202842-g1-footprint-regressions


1594     create_aux_memory_mapper("Card Counts Table",
1595                              G1CardCounts::compute_size(g1_rs.size() / HeapWordSize),
1596                              G1CardCounts::heap_map_factor());
1597 
1598   size_t bitmap_size = G1CMBitMap::compute_size(g1_rs.size());
1599   G1RegionToSpaceMapper* prev_bitmap_storage =
1600     create_aux_memory_mapper("Prev Bitmap", bitmap_size, G1CMBitMap::heap_map_factor());
1601   G1RegionToSpaceMapper* next_bitmap_storage =
1602     create_aux_memory_mapper("Next Bitmap", bitmap_size, G1CMBitMap::heap_map_factor());
1603 
1604   _hrm.initialize(heap_storage, prev_bitmap_storage, next_bitmap_storage, bot_storage, cardtable_storage, card_counts_storage);
1605   _card_table->initialize(cardtable_storage);
1606   // Do later initialization work for concurrent refinement.
1607   _hot_card_cache->initialize(card_counts_storage);
1608 
1609   // 6843694 - ensure that the maximum region index can fit
1610   // in the remembered set structures.
1611   const uint max_region_idx = (1U << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1;
1612   guarantee((max_regions() - 1) <= max_region_idx, "too many regions");
1613 



1614   // Also create a G1 rem set.
1615   _g1_rem_set = new G1RemSet(this, _card_table, _hot_card_cache);
1616   _g1_rem_set->initialize(max_capacity(), max_regions());
1617 
1618   size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1;
1619   guarantee(HeapRegion::CardsPerRegion > 0, "make sure it's initialized");
1620   guarantee(HeapRegion::CardsPerRegion < max_cards_per_region,
1621             "too many cards per region");
1622 
1623   FreeRegionList::set_unrealistically_long_length(max_regions() + 1);
1624 
1625   _bot = new G1BlockOffsetTable(reserved_region(), bot_storage);
1626 
1627   {
1628     HeapWord* start = _hrm.reserved().start();
1629     HeapWord* end = _hrm.reserved().end();
1630     size_t granularity = HeapRegion::GrainBytes;
1631 
1632     _in_cset_fast_test.initialize(start, end, granularity);
1633     _humongous_reclaim_candidates.initialize(start, end, granularity);




1594     create_aux_memory_mapper("Card Counts Table",
1595                              G1CardCounts::compute_size(g1_rs.size() / HeapWordSize),
1596                              G1CardCounts::heap_map_factor());
1597 
1598   size_t bitmap_size = G1CMBitMap::compute_size(g1_rs.size());
1599   G1RegionToSpaceMapper* prev_bitmap_storage =
1600     create_aux_memory_mapper("Prev Bitmap", bitmap_size, G1CMBitMap::heap_map_factor());
1601   G1RegionToSpaceMapper* next_bitmap_storage =
1602     create_aux_memory_mapper("Next Bitmap", bitmap_size, G1CMBitMap::heap_map_factor());
1603 
1604   _hrm.initialize(heap_storage, prev_bitmap_storage, next_bitmap_storage, bot_storage, cardtable_storage, card_counts_storage);
1605   _card_table->initialize(cardtable_storage);
1606   // Do later initialization work for concurrent refinement.
1607   _hot_card_cache->initialize(card_counts_storage);
1608 
1609   // 6843694 - ensure that the maximum region index can fit
1610   // in the remembered set structures.
1611   const uint max_region_idx = (1U << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1;
1612   guarantee((max_regions() - 1) <= max_region_idx, "too many regions");
1613 
1614   // The G1FromCardCache reserves card with value 0 as "invalid", so the heap must not
1615   // start within the first card.
1616   guarantee(g1_rs.base() >= (char*)G1CardTable::card_size, "Java heap must not start within the first card.");
1617   // Also create a G1 rem set.
1618   _g1_rem_set = new G1RemSet(this, _card_table, _hot_card_cache);
1619   _g1_rem_set->initialize(max_capacity(), max_regions());
1620 
1621   size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1;
1622   guarantee(HeapRegion::CardsPerRegion > 0, "make sure it's initialized");
1623   guarantee(HeapRegion::CardsPerRegion < max_cards_per_region,
1624             "too many cards per region");
1625 
1626   FreeRegionList::set_unrealistically_long_length(max_regions() + 1);
1627 
1628   _bot = new G1BlockOffsetTable(reserved_region(), bot_storage);
1629 
1630   {
1631     HeapWord* start = _hrm.reserved().start();
1632     HeapWord* end = _hrm.reserved().end();
1633     size_t granularity = HeapRegion::GrainBytes;
1634 
1635     _in_cset_fast_test.initialize(start, end, granularity);
1636     _humongous_reclaim_candidates.initialize(start, end, granularity);


< prev index next >