hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
changeset 35901 f5028c67e7cb
parent 35877 a2a62511d0f8
child 35939 05df7e64ecfc
equal deleted inserted replaced
35900:d64cf9290fc4 35901:f5028c67e7cb
   193 const char* PSParallelCompact::space_names[] = {
   193 const char* PSParallelCompact::space_names[] = {
   194   "old ", "eden", "from", "to  "
   194   "old ", "eden", "from", "to  "
   195 };
   195 };
   196 
   196 
   197 void PSParallelCompact::print_region_ranges() {
   197 void PSParallelCompact::print_region_ranges() {
   198   if (!develop_log_is_enabled(Trace, gc, compaction, phases)) {
   198   if (!log_develop_is_enabled(Trace, gc, compaction, phases)) {
   199     return;
   199     return;
   200   }
   200   }
   201   LogHandle(gc, compaction, phases) log;
   201   LogHandle(gc, compaction, phases) log;
   202   ResourceMark rm;
   202   ResourceMark rm;
   203   Universe::print_on(log.trace_stream());
   203   Universe::print_on(log.trace_stream());
   263 
   263 
   264 void
   264 void
   265 print_generic_summary_data(ParallelCompactData& summary_data,
   265 print_generic_summary_data(ParallelCompactData& summary_data,
   266                            SpaceInfo* space_info)
   266                            SpaceInfo* space_info)
   267 {
   267 {
   268   if (!develop_log_is_enabled(Trace, gc, compaction, phases)) {
   268   if (!log_develop_is_enabled(Trace, gc, compaction, phases)) {
   269     return;
   269     return;
   270   }
   270   }
   271 
   271 
   272   for (unsigned int id = 0; id < PSParallelCompact::last_space_id; ++id) {
   272   for (unsigned int id = 0; id < PSParallelCompact::last_space_id; ++id) {
   273     const MutableSpace* space = space_info[id].space();
   273     const MutableSpace* space = space_info[id].space();
   358 }
   358 }
   359 
   359 
   360 void
   360 void
   361 print_initial_summary_data(ParallelCompactData& summary_data,
   361 print_initial_summary_data(ParallelCompactData& summary_data,
   362                            SpaceInfo* space_info) {
   362                            SpaceInfo* space_info) {
   363   if (!develop_log_is_enabled(Trace, gc, compaction, phases)) {
   363   if (!log_develop_is_enabled(Trace, gc, compaction, phases)) {
   364     return;
   364     return;
   365   }
   365   }
   366 
   366 
   367   unsigned int id = PSParallelCompact::old_space_id;
   367   unsigned int id = PSParallelCompact::old_space_id;
   368   const MutableSpace* space;
   368   const MutableSpace* space;
   639 
   639 
   640   // Setup the continuation addresses.
   640   // Setup the continuation addresses.
   641   *target_next = split_destination + partial_obj_size;
   641   *target_next = split_destination + partial_obj_size;
   642   HeapWord* const source_next = region_to_addr(split_region) + partial_obj_size;
   642   HeapWord* const source_next = region_to_addr(split_region) + partial_obj_size;
   643 
   643 
   644   if (develop_log_is_enabled(Trace, gc, compaction, phases)) {
   644   if (log_develop_is_enabled(Trace, gc, compaction, phases)) {
   645     const char * split_type = partial_obj_size == 0 ? "easy" : "hard";
   645     const char * split_type = partial_obj_size == 0 ? "easy" : "hard";
   646     log_develop_trace(gc, compaction, phases)("%s split:  src=" PTR_FORMAT " src_c=" SIZE_FORMAT " pos=" SIZE_FORMAT,
   646     log_develop_trace(gc, compaction, phases)("%s split:  src=" PTR_FORMAT " src_c=" SIZE_FORMAT " pos=" SIZE_FORMAT,
   647                                               split_type, p2i(source_next), split_region, partial_obj_size);
   647                                               split_type, p2i(source_next), split_region, partial_obj_size);
   648     log_develop_trace(gc, compaction, phases)("%s split:  dst=" PTR_FORMAT " dst_c=" SIZE_FORMAT " tn=" PTR_FORMAT,
   648     log_develop_trace(gc, compaction, phases)("%s split:  dst=" PTR_FORMAT " dst_c=" SIZE_FORMAT " tn=" PTR_FORMAT,
   649                                               split_type, p2i(split_destination),
   649                                               split_type, p2i(split_destination),
  1533                               dense_prefix_end, space->end(),
  1533                               dense_prefix_end, space->end(),
  1534                               _space_info[id].new_top_addr());
  1534                               _space_info[id].new_top_addr());
  1535     }
  1535     }
  1536   }
  1536   }
  1537 
  1537 
  1538   if (develop_log_is_enabled(Trace, gc, compaction, phases)) {
  1538   if (log_develop_is_enabled(Trace, gc, compaction, phases)) {
  1539     const size_t region_size = ParallelCompactData::RegionSize;
  1539     const size_t region_size = ParallelCompactData::RegionSize;
  1540     HeapWord* const dense_prefix_end = _space_info[id].dense_prefix();
  1540     HeapWord* const dense_prefix_end = _space_info[id].dense_prefix();
  1541     const size_t dp_region = _summary_data.addr_to_region_idx(dense_prefix_end);
  1541     const size_t dp_region = _summary_data.addr_to_region_idx(dense_prefix_end);
  1542     const size_t dp_words = pointer_delta(dense_prefix_end, space->bottom());
  1542     const size_t dp_words = pointer_delta(dense_prefix_end, space->bottom());
  1543     HeapWord* const new_top = _space_info[id].new_top();
  1543     HeapWord* const new_top = _space_info[id].new_top();
  2188   size_t _regions[LineLength];
  2188   size_t _regions[LineLength];
  2189   int _next_index;
  2189   int _next_index;
  2190   bool _enabled;
  2190   bool _enabled;
  2191   size_t _total_regions;
  2191   size_t _total_regions;
  2192 public:
  2192 public:
  2193   FillableRegionLogger() : _next_index(0), _total_regions(0), _enabled(develop_log_is_enabled(Trace, gc, compaction)) { }
  2193   FillableRegionLogger() : _next_index(0), _total_regions(0), _enabled(log_develop_is_enabled(Trace, gc, compaction)) { }
  2194   ~FillableRegionLogger() {
  2194   ~FillableRegionLogger() {
  2195     log.trace(SIZE_FORMAT " initially fillable regions", _total_regions);
  2195     log.trace(SIZE_FORMAT " initially fillable regions", _total_regions);
  2196   }
  2196   }
  2197 
  2197 
  2198   void print_line() {
  2198   void print_line() {
  2379 #ifdef ASSERT
  2379 #ifdef ASSERT
  2380 // Write a histogram of the number of times the block table was filled for a
  2380 // Write a histogram of the number of times the block table was filled for a
  2381 // region.
  2381 // region.
  2382 void PSParallelCompact::write_block_fill_histogram()
  2382 void PSParallelCompact::write_block_fill_histogram()
  2383 {
  2383 {
  2384   if (!develop_log_is_enabled(Trace, gc, compaction)) {
  2384   if (!log_develop_is_enabled(Trace, gc, compaction)) {
  2385     return;
  2385     return;
  2386   }
  2386   }
  2387 
  2387 
  2388   LogHandle(gc, compaction) log;
  2388   LogHandle(gc, compaction) log;
  2389   ResourceMark rm;
  2389   ResourceMark rm;