< prev index next >

src/hotspot/share/gc/shared/cardTable.cpp

Print this page

 26 #include "gc/shared/cardTable.hpp"
 27 #include "gc/shared/collectedHeap.hpp"
 28 #include "gc/shared/gcLogPrecious.hpp"
 29 #include "gc/shared/gc_globals.hpp"
 30 #include "gc/shared/space.inline.hpp"
 31 #include "logging/log.hpp"
 32 #include "memory/virtualspace.hpp"
 33 #include "runtime/java.hpp"
 34 #include "runtime/os.hpp"
 35 #include "services/memTracker.hpp"
 36 #include "utilities/align.hpp"
 37 #if INCLUDE_PARALLELGC
 38 #include "gc/parallel/objectStartArray.hpp"
 39 #endif
 40 
 41 uint CardTable::_card_shift = 0;
 42 uint CardTable::_card_size = 0;
 43 uint CardTable::_card_size_in_words = 0;
 44 
 45 void CardTable::initialize_card_size() {
 46   assert(UseG1GC || UseParallelGC || UseSerialGC,
 47          "Initialize card size should only be called by card based collectors.");
 48 
 49   _card_size = GCCardSizeInBytes;
 50   _card_shift = log2i_exact(_card_size);
 51   _card_size_in_words = _card_size / sizeof(HeapWord);
 52 
 53   // Set blockOffsetTable size based on card table entry size
 54   BOTConstants::initialize_bot_size(_card_shift);
 55 
 56 #if INCLUDE_PARALLELGC
 57   // Set ObjectStartArray block size based on card table entry size
 58   ObjectStartArray::initialize_block_size(_card_shift);
 59 #endif
 60 
 61   log_info_p(gc, init)("CardTable entry size: " UINT32_FORMAT,  _card_size);
 62 }
 63 
 64 size_t CardTable::compute_byte_map_size() {
 65   assert(_guard_index == cards_required(_whole_heap.word_size()) - 1,
 66                                         "uninitialized, check declaration order");

 26 #include "gc/shared/cardTable.hpp"
 27 #include "gc/shared/collectedHeap.hpp"
 28 #include "gc/shared/gcLogPrecious.hpp"
 29 #include "gc/shared/gc_globals.hpp"
 30 #include "gc/shared/space.inline.hpp"
 31 #include "logging/log.hpp"
 32 #include "memory/virtualspace.hpp"
 33 #include "runtime/java.hpp"
 34 #include "runtime/os.hpp"
 35 #include "services/memTracker.hpp"
 36 #include "utilities/align.hpp"
 37 #if INCLUDE_PARALLELGC
 38 #include "gc/parallel/objectStartArray.hpp"
 39 #endif
 40 
 41 uint CardTable::_card_shift = 0;
 42 uint CardTable::_card_size = 0;
 43 uint CardTable::_card_size_in_words = 0;
 44 
 45 void CardTable::initialize_card_size() {
 46   assert(UseG1GC || UseParallelGC || UseSerialGC || UseShenandoahGC,
 47          "Initialize card size should only be called by card based collectors.");
 48 
 49   _card_size = GCCardSizeInBytes;
 50   _card_shift = log2i_exact(_card_size);
 51   _card_size_in_words = _card_size / sizeof(HeapWord);
 52 
 53   // Set blockOffsetTable size based on card table entry size
 54   BOTConstants::initialize_bot_size(_card_shift);
 55 
 56 #if INCLUDE_PARALLELGC
 57   // Set ObjectStartArray block size based on card table entry size
 58   ObjectStartArray::initialize_block_size(_card_shift);
 59 #endif
 60 
 61   log_info_p(gc, init)("CardTable entry size: " UINT32_FORMAT,  _card_size);
 62 }
 63 
 64 size_t CardTable::compute_byte_map_size() {
 65   assert(_guard_index == cards_required(_whole_heap.word_size()) - 1,
 66                                         "uninitialized, check declaration order");
< prev index next >