< prev index next >

src/share/vm/gc/parallel/psParallelCompact.cpp

Print this page




1467     } else if (_mark_bitmap.is_obj_end(dense_prefix_bit - 2)) {
1468       // Case b above.
1469       obj_beg = dense_prefix_end - 1;
1470     } else if (!_mark_bitmap.is_obj_end(dense_prefix_bit - 3) &&
1471                _mark_bitmap.is_obj_end(dense_prefix_bit - 4)) {
1472       // Case d above.
1473       obj_beg = dense_prefix_end - 3;
1474       obj_len = 3;
1475     }
1476 #endif  // #ifdef _LP64
1477 
1478     CollectedHeap::fill_with_object(obj_beg, obj_len);
1479     _mark_bitmap.mark_obj(obj_beg, obj_len);
1480     _summary_data.add_obj(obj_beg, obj_len);
1481     assert(start_array(id) != NULL, "sanity");
1482     start_array(id)->allocate_block(obj_beg);
1483   }
1484 }
1485 
1486 void
1487 PSParallelCompact::clear_source_region(HeapWord* beg_addr, HeapWord* end_addr)
1488 {
1489   RegionData* const beg_ptr = _summary_data.addr_to_region_ptr(beg_addr);
1490   HeapWord* const end_aligned_up = _summary_data.region_align_up(end_addr);
1491   RegionData* const end_ptr = _summary_data.addr_to_region_ptr(end_aligned_up);
1492   for (RegionData* cur = beg_ptr; cur < end_ptr; ++cur) {
1493     cur->set_source_region(0);
1494   }
1495 }
1496 
1497 void
1498 PSParallelCompact::summarize_space(SpaceId id, bool maximum_compaction)
1499 {
1500   assert(id < last_space_id, "id out of range");
1501   assert(_space_info[id].dense_prefix() == _space_info[id].space()->bottom(),
1502          "should have been reset in summarize_spaces_quick()");
1503 
1504   const MutableSpace* space = _space_info[id].space();
1505   if (_space_info[id].new_top() != space->bottom()) {
1506     HeapWord* dense_prefix_end = compute_dense_prefix(id, maximum_compaction);
1507     _space_info[id].set_dense_prefix(dense_prefix_end);
1508 
1509 #ifndef PRODUCT
1510     if (TraceParallelOldGCDensePrefix) {
1511       print_dense_prefix_stats("ratio", id, maximum_compaction,
1512                                dense_prefix_end);
1513       HeapWord* addr = compute_dense_prefix_via_density(id, maximum_compaction);
1514       print_dense_prefix_stats("density", id, maximum_compaction, addr);
1515     }
1516 #endif  // #ifndef PRODUCT
1517 




1467     } else if (_mark_bitmap.is_obj_end(dense_prefix_bit - 2)) {
1468       // Case b above.
1469       obj_beg = dense_prefix_end - 1;
1470     } else if (!_mark_bitmap.is_obj_end(dense_prefix_bit - 3) &&
1471                _mark_bitmap.is_obj_end(dense_prefix_bit - 4)) {
1472       // Case d above.
1473       obj_beg = dense_prefix_end - 3;
1474       obj_len = 3;
1475     }
1476 #endif  // #ifdef _LP64
1477 
1478     CollectedHeap::fill_with_object(obj_beg, obj_len);
1479     _mark_bitmap.mark_obj(obj_beg, obj_len);
1480     _summary_data.add_obj(obj_beg, obj_len);
1481     assert(start_array(id) != NULL, "sanity");
1482     start_array(id)->allocate_block(obj_beg);
1483   }
1484 }
1485 
1486 void











1487 PSParallelCompact::summarize_space(SpaceId id, bool maximum_compaction)
1488 {
1489   assert(id < last_space_id, "id out of range");
1490   assert(_space_info[id].dense_prefix() == _space_info[id].space()->bottom(),
1491          "should have been reset in summarize_spaces_quick()");
1492 
1493   const MutableSpace* space = _space_info[id].space();
1494   if (_space_info[id].new_top() != space->bottom()) {
1495     HeapWord* dense_prefix_end = compute_dense_prefix(id, maximum_compaction);
1496     _space_info[id].set_dense_prefix(dense_prefix_end);
1497 
1498 #ifndef PRODUCT
1499     if (TraceParallelOldGCDensePrefix) {
1500       print_dense_prefix_stats("ratio", id, maximum_compaction,
1501                                dense_prefix_end);
1502       HeapWord* addr = compute_dense_prefix_via_density(id, maximum_compaction);
1503       print_dense_prefix_stats("density", id, maximum_compaction, addr);
1504     }
1505 #endif  // #ifndef PRODUCT
1506 


< prev index next >