Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegion.cpp @ 20274:a8137787acfe
8047821: G1 Does not use the save_marks functionality as intended
Summary: Rename save_marks to record_top_and_timestamp and remove som unused but related methods
Reviewed-by: stefank, ehelin
author | mgerdin |
---|---|
date | Thu, 26 Jun 2014 10:00:00 +0200 |
parents | e635a728f9da |
children | 1526a938e670 |
comparison
equal
deleted
inserted
replaced
20273:9441d22e429a | 20274:a8137787acfe |
---|---|
371 _orig_end = mr.end(); | 371 _orig_end = mr.end(); |
372 // Note that initialize() will set the start of the unmarked area of the | 372 // Note that initialize() will set the start of the unmarked area of the |
373 // region. | 373 // region. |
374 hr_clear(false /*par*/, false /*clear_space*/); | 374 hr_clear(false /*par*/, false /*clear_space*/); |
375 set_top(bottom()); | 375 set_top(bottom()); |
376 set_saved_mark(); | 376 record_top_and_timestamp(); |
377 | 377 |
378 assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant."); | 378 assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant."); |
379 } | 379 } |
380 | 380 |
381 CompactibleSpace* HeapRegion::next_compaction_space() const { | 381 CompactibleSpace* HeapRegion::next_compaction_space() const { |
389 return hr; | 389 return hr; |
390 } | 390 } |
391 index += 1; | 391 index += 1; |
392 } | 392 } |
393 return NULL; | 393 return NULL; |
394 } | |
395 | |
396 void HeapRegion::save_marks() { | |
397 set_saved_mark(); | |
398 } | |
399 | |
400 void HeapRegion::oops_in_mr_iterate(MemRegion mr, ExtendedOopClosure* cl) { | |
401 HeapWord* p = mr.start(); | |
402 HeapWord* e = mr.end(); | |
403 oop obj; | |
404 while (p < e) { | |
405 obj = oop(p); | |
406 p += obj->oop_iterate(cl); | |
407 } | |
408 assert(p == e, "bad memregion: doesn't end on obj boundary"); | |
409 } | |
410 | |
411 #define HeapRegion_OOP_SINCE_SAVE_MARKS_DEFN(OopClosureType, nv_suffix) \ | |
412 void HeapRegion::oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl) { \ | |
413 ContiguousSpace::oop_since_save_marks_iterate##nv_suffix(cl); \ | |
414 } | |
415 SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DEFN) | |
416 | |
417 | |
418 void HeapRegion::oop_before_save_marks_iterate(ExtendedOopClosure* cl) { | |
419 oops_in_mr_iterate(MemRegion(bottom(), saved_mark_word()), cl); | |
420 } | 394 } |
421 | 395 |
422 void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark, | 396 void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark, |
423 bool during_conc_mark) { | 397 bool during_conc_mark) { |
424 // We always recreate the prev marking info and we'll explicitly | 398 // We always recreate the prev marking info and we'll explicitly |
1105 return top(); | 1079 return top(); |
1106 else | 1080 else |
1107 return ContiguousSpace::saved_mark_word(); | 1081 return ContiguousSpace::saved_mark_word(); |
1108 } | 1082 } |
1109 | 1083 |
1110 void G1OffsetTableContigSpace::set_saved_mark() { | 1084 void G1OffsetTableContigSpace::record_top_and_timestamp() { |
1111 G1CollectedHeap* g1h = G1CollectedHeap::heap(); | 1085 G1CollectedHeap* g1h = G1CollectedHeap::heap(); |
1112 unsigned curr_gc_time_stamp = g1h->get_gc_time_stamp(); | 1086 unsigned curr_gc_time_stamp = g1h->get_gc_time_stamp(); |
1113 | 1087 |
1114 if (_gc_time_stamp < curr_gc_time_stamp) { | 1088 if (_gc_time_stamp < curr_gc_time_stamp) { |
1115 // The order of these is important, as another thread might be | 1089 // The order of these is important, as another thread might be |