< prev index next >

src/hotspot/share/gc/g1/heapRegion.inline.hpp

Print this page
rev 49497 : [mq]: 8200234-g1concurrentmark-refactorings


 230 
 231 inline HeapWord* HeapRegion::allocate_no_bot_updates(size_t word_size) {
 232   size_t temp;
 233   return allocate_no_bot_updates(word_size, word_size, &temp);
 234 }
 235 
 236 inline HeapWord* HeapRegion::allocate_no_bot_updates(size_t min_word_size,
 237                                                      size_t desired_word_size,
 238                                                      size_t* actual_word_size) {
 239   assert(is_young(), "we can only skip BOT updates on young regions");
 240   return allocate_impl(min_word_size, desired_word_size, actual_word_size);
 241 }
 242 
 243 inline void HeapRegion::note_start_of_marking() {
 244   _next_marked_bytes = 0;
 245   _next_top_at_mark_start = top();
 246 }
 247 
 248 inline void HeapRegion::note_end_of_marking() {
 249   _prev_top_at_mark_start = _next_top_at_mark_start;

 250   _prev_marked_bytes = _next_marked_bytes;
 251   _next_marked_bytes = 0;
 252 }
 253 
 254 inline void HeapRegion::note_start_of_copying(bool during_initial_mark) {
 255   if (is_survivor()) {
 256     // This is how we always allocate survivors.
 257     assert(_next_top_at_mark_start == bottom(), "invariant");
 258   } else {
 259     if (during_initial_mark) {
 260       // During initial-mark we'll explicitly mark any objects on old
 261       // regions that are pointed to by roots. Given that explicit
 262       // marks only make sense under NTAMS it'd be nice if we could
 263       // check that condition if we wanted to. Given that we don't
 264       // know where the top of this region will end up, we simply set
 265       // NTAMS to the end of the region so all marks will be below
 266       // NTAMS. We'll set it to the actual top when we retire this region.
 267       _next_top_at_mark_start = end();
 268     } else {
 269       // We could have re-used this old region as to-space over a




 230 
 231 inline HeapWord* HeapRegion::allocate_no_bot_updates(size_t word_size) {
 232   size_t temp;
 233   return allocate_no_bot_updates(word_size, word_size, &temp);
 234 }
 235 
 236 inline HeapWord* HeapRegion::allocate_no_bot_updates(size_t min_word_size,
 237                                                      size_t desired_word_size,
 238                                                      size_t* actual_word_size) {
 239   assert(is_young(), "we can only skip BOT updates on young regions");
 240   return allocate_impl(min_word_size, desired_word_size, actual_word_size);
 241 }
 242 
 243 inline void HeapRegion::note_start_of_marking() {
 244   _next_marked_bytes = 0;
 245   _next_top_at_mark_start = top();
 246 }
 247 
 248 inline void HeapRegion::note_end_of_marking() {
 249   _prev_top_at_mark_start = _next_top_at_mark_start;
 250   _next_top_at_mark_start = bottom();
 251   _prev_marked_bytes = _next_marked_bytes;
 252   _next_marked_bytes = 0;
 253 }
 254 
 255 inline void HeapRegion::note_start_of_copying(bool during_initial_mark) {
 256   if (is_survivor()) {
 257     // This is how we always allocate survivors.
 258     assert(_next_top_at_mark_start == bottom(), "invariant");
 259   } else {
 260     if (during_initial_mark) {
 261       // During initial-mark we'll explicitly mark any objects on old
 262       // regions that are pointed to by roots. Given that explicit
 263       // marks only make sense under NTAMS it'd be nice if we could
 264       // check that condition if we wanted to. Given that we don't
 265       // know where the top of this region will end up, we simply set
 266       // NTAMS to the end of the region so all marks will be below
 267       // NTAMS. We'll set it to the actual top when we retire this region.
 268       _next_top_at_mark_start = end();
 269     } else {
 270       // We could have re-used this old region as to-space over a


< prev index next >