< prev index next >

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

Print this page

        

@@ -193,14 +193,14 @@
 const char* PSParallelCompact::space_names[] = {
   "old ", "eden", "from", "to  "
 };
 
 void PSParallelCompact::print_region_ranges() {
-  if (!log_develop_is_enabled(Trace, gc, compaction, phases)) {
+  if (!log_develop_is_enabled(Trace, gc, compaction)) {
     return;
   }
-  LogHandle(gc, compaction, phases) log;
+  LogHandle(gc, compaction) log;
   ResourceMark rm;
   Universe::print_on(log.trace_stream());
   log.trace("space  bottom     top        end        new_top");
   log.trace("------ ---------- ---------- ---------- ----------");
 

@@ -223,11 +223,11 @@
 #define REGION_IDX_FORMAT        SIZE_FORMAT_W(7)
 #define REGION_DATA_FORMAT       SIZE_FORMAT_W(5)
 
   ParallelCompactData& sd = PSParallelCompact::summary_data();
   size_t dci = c->destination() ? sd.addr_to_region_idx(c->destination()) : 0;
-  log_develop_trace(gc, compaction, phases)(
+  log_develop_trace(gc, compaction)(
       REGION_IDX_FORMAT " " PTR_FORMAT " "
       REGION_IDX_FORMAT " " PTR_FORMAT " "
       REGION_DATA_FORMAT " " REGION_DATA_FORMAT " "
       REGION_DATA_FORMAT " " REGION_IDX_FORMAT " %d",
       i, p2i(c->data_location()), dci, p2i(c->destination()),

@@ -256,18 +256,18 @@
       pdest = c->destination();
     }
     ++i;
   }
 
-  log_develop_trace(gc, compaction, phases)("summary_data_bytes=" SIZE_FORMAT, total_words * HeapWordSize);
+  log_develop_trace(gc, compaction)("summary_data_bytes=" SIZE_FORMAT, total_words * HeapWordSize);
 }
 
 void
 print_generic_summary_data(ParallelCompactData& summary_data,
                            SpaceInfo* space_info)
 {
-  if (!log_develop_is_enabled(Trace, gc, compaction, phases)) {
+  if (!log_develop_is_enabled(Trace, gc, compaction)) {
     return;
   }
 
   for (unsigned int id = 0; id < PSParallelCompact::last_space_id; ++id) {
     const MutableSpace* space = space_info[id].space();

@@ -294,11 +294,11 @@
   // Print (and count) the full regions at the beginning of the space.
   size_t full_region_count = 0;
   size_t i = summary_data.addr_to_region_idx(space->bottom());
   while (i < end_region && summary_data.region(i)->data_size() == region_size) {
     ParallelCompactData::RegionData* c = summary_data.region(i);
-    log_develop_trace(gc, compaction, phases)(
+    log_develop_trace(gc, compaction)(
         SIZE_FORMAT_W(5) " " PTR_FORMAT " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " %d",
         i, p2i(c->destination()),
         c->partial_obj_size(), c->live_obj_size(),
         c->data_size(), c->source_region(), c->destination_count());
     ++full_region_count;

@@ -328,11 +328,11 @@
             max_dead_to_right = dead_to_right;
             max_live_to_right = live_to_right;
     }
 
     ParallelCompactData::RegionData* c = summary_data.region(i);
-    log_develop_trace(gc, compaction, phases)(
+    log_develop_trace(gc, compaction)(
         SIZE_FORMAT_W(5) " " PTR_FORMAT " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " %d"
         "%12.10f " SIZE_FORMAT_W(10) " " SIZE_FORMAT_W(10),
         i, p2i(c->destination()),
         c->partial_obj_size(), c->live_obj_size(),
         c->data_size(), c->source_region(), c->destination_count(),

@@ -344,25 +344,25 @@
   }
 
   // Any remaining regions are empty.  Print one more if there is one.
   if (i < end_region) {
     ParallelCompactData::RegionData* c = summary_data.region(i);
-    log_develop_trace(gc, compaction, phases)(
+    log_develop_trace(gc, compaction)(
         SIZE_FORMAT_W(5) " " PTR_FORMAT " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " %d",
          i, p2i(c->destination()),
          c->partial_obj_size(), c->live_obj_size(),
          c->data_size(), c->source_region(), c->destination_count());
   }
 
-  log_develop_trace(gc, compaction, phases)("max:  " SIZE_FORMAT_W(4) " d2r=" SIZE_FORMAT_W(10) " l2r=" SIZE_FORMAT_W(10) " max_ratio=%14.12f",
+  log_develop_trace(gc, compaction)("max:  " SIZE_FORMAT_W(4) " d2r=" SIZE_FORMAT_W(10) " l2r=" SIZE_FORMAT_W(10) " max_ratio=%14.12f",
                                             max_reclaimed_ratio_region, max_dead_to_right, max_live_to_right, max_reclaimed_ratio);
 }
 
 void
 print_initial_summary_data(ParallelCompactData& summary_data,
                            SpaceInfo* space_info) {
-  if (!log_develop_is_enabled(Trace, gc, compaction, phases)) {
+  if (!log_develop_is_enabled(Trace, gc, compaction)) {
     return;
   }
 
   unsigned int id = PSParallelCompact::old_space_id;
   const MutableSpace* space;

@@ -619,11 +619,11 @@
     const size_t beg_idx =
       addr_to_region_idx(region_align_up(sr->destination() +
                                          sr->partial_obj_size()));
     const size_t end_idx = addr_to_region_idx(target_end);
 
-    log_develop_trace(gc, compaction, phases)("split:  clearing source_region field in [" SIZE_FORMAT ", " SIZE_FORMAT ")", beg_idx, end_idx);
+    log_develop_trace(gc, compaction)("split:  clearing source_region field in [" SIZE_FORMAT ", " SIZE_FORMAT ")", beg_idx, end_idx);
     for (size_t idx = beg_idx; idx < end_idx; ++idx) {
       _region_data[idx].set_source_region(0);
     }
 
     // Set split_destination and partial_obj_size to reflect the split region.

@@ -639,23 +639,23 @@
 
   // Setup the continuation addresses.
   *target_next = split_destination + partial_obj_size;
   HeapWord* const source_next = region_to_addr(split_region) + partial_obj_size;
 
-  if (log_develop_is_enabled(Trace, gc, compaction, phases)) {
+  if (log_develop_is_enabled(Trace, gc, compaction)) {
     const char * split_type = partial_obj_size == 0 ? "easy" : "hard";
-    log_develop_trace(gc, compaction, phases)("%s split:  src=" PTR_FORMAT " src_c=" SIZE_FORMAT " pos=" SIZE_FORMAT,
+    log_develop_trace(gc, compaction)("%s split:  src=" PTR_FORMAT " src_c=" SIZE_FORMAT " pos=" SIZE_FORMAT,
                                               split_type, p2i(source_next), split_region, partial_obj_size);
-    log_develop_trace(gc, compaction, phases)("%s split:  dst=" PTR_FORMAT " dst_c=" SIZE_FORMAT " tn=" PTR_FORMAT,
+    log_develop_trace(gc, compaction)("%s split:  dst=" PTR_FORMAT " dst_c=" SIZE_FORMAT " tn=" PTR_FORMAT,
                                               split_type, p2i(split_destination),
                                               addr_to_region_idx(split_destination),
                                               p2i(*target_next));
 
     if (partial_obj_size != 0) {
       HeapWord* const po_beg = split_info.destination();
       HeapWord* const po_end = po_beg + split_info.partial_obj_size();
-      log_develop_trace(gc, compaction, phases)("%s split:  po_beg=" PTR_FORMAT " " SIZE_FORMAT " po_end=" PTR_FORMAT " " SIZE_FORMAT,
+      log_develop_trace(gc, compaction)("%s split:  po_beg=" PTR_FORMAT " " SIZE_FORMAT " po_end=" PTR_FORMAT " " SIZE_FORMAT,
                                                 split_type,
                                                 p2i(po_beg), addr_to_region_idx(po_beg),
                                                 p2i(po_end), addr_to_region_idx(po_end));
     }
   }

@@ -668,11 +668,11 @@
                                     HeapWord** source_next,
                                     HeapWord* target_beg, HeapWord* target_end,
                                     HeapWord** target_next)
 {
   HeapWord* const source_next_val = source_next == NULL ? NULL : *source_next;
-  log_develop_trace(gc, compaction, phases)(
+  log_develop_trace(gc, compaction)(
       "sb=" PTR_FORMAT " se=" PTR_FORMAT " sn=" PTR_FORMAT
       "tb=" PTR_FORMAT " te=" PTR_FORMAT " tn=" PTR_FORMAT,
       p2i(source_beg), p2i(source_end), p2i(source_next_val),
       p2i(target_beg), p2i(target_end), p2i(*target_next));
 

@@ -936,11 +936,11 @@
 {
   // Update the from & to space pointers in space_info, since they are swapped
   // at each young gen gc.  Do the update unconditionally (even though a
   // promotion failure does not swap spaces) because an unknown number of young
   // collections will have swapped the spaces an unknown number of times.
-  GCTraceTime(Trace, gc, phases) tm("Pre Compact", &_gc_timer);
+  GCTraceTime(Debug, gc, phases) tm("Pre Compact", &_gc_timer);
   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
   _space_info[from_space_id].set_space(heap->young_gen()->from_space());
   _space_info[to_space_id].set_space(heap->young_gen()->to_space());
 
   DEBUG_ONLY(add_obj_count = add_obj_size = 0;)

@@ -979,11 +979,11 @@
   ParCompactionManager::reset_all_bitmap_query_caches();
 }
 
 void PSParallelCompact::post_compact()
 {
-  GCTraceTime(Trace, gc, phases) tm("Post Compact", &_gc_timer);
+  GCTraceTime(Info, gc, phases) tm("Post Compact", &_gc_timer);
 
   for (unsigned int id = old_space_id; id < last_space_id; ++id) {
     // Clear the marking bitmap, summary data and split info.
     clear_data_covering_space(SpaceId(id));
     // Update top().  Must be done after clearing the bitmap and summary data.

@@ -1522,19 +1522,19 @@
                               dense_prefix_end, space->end(),
                               _space_info[id].new_top_addr());
     }
   }
 
-  if (log_develop_is_enabled(Trace, gc, compaction, phases)) {
+  if (log_develop_is_enabled(Trace, gc, compaction)) {
     const size_t region_size = ParallelCompactData::RegionSize;
     HeapWord* const dense_prefix_end = _space_info[id].dense_prefix();
     const size_t dp_region = _summary_data.addr_to_region_idx(dense_prefix_end);
     const size_t dp_words = pointer_delta(dense_prefix_end, space->bottom());
     HeapWord* const new_top = _space_info[id].new_top();
     const HeapWord* nt_aligned_up = _summary_data.region_align_up(new_top);
     const size_t cr_words = pointer_delta(nt_aligned_up, dense_prefix_end);
-    log_develop_trace(gc, compaction, phases)(
+    log_develop_trace(gc, compaction)(
         "id=%d cap=" SIZE_FORMAT " dp=" PTR_FORMAT " "
         "dp_region=" SIZE_FORMAT " " "dp_count=" SIZE_FORMAT " "
         "cr_count=" SIZE_FORMAT " " "nt=" PTR_FORMAT,
         id, space->capacity_in_words(), p2i(dense_prefix_end),
         dp_region, dp_words / region_size,

@@ -1546,11 +1546,11 @@
 void PSParallelCompact::summary_phase_msg(SpaceId dst_space_id,
                                           HeapWord* dst_beg, HeapWord* dst_end,
                                           SpaceId src_space_id,
                                           HeapWord* src_beg, HeapWord* src_end)
 {
-  log_develop_trace(gc, compaction, phases)(
+  log_develop_trace(gc, compaction)(
       "Summarizing %d [%s] into %d [%s]:  "
       "src=" PTR_FORMAT "-" PTR_FORMAT " "
       SIZE_FORMAT "-" SIZE_FORMAT " "
       "dst=" PTR_FORMAT "-" PTR_FORMAT " "
       SIZE_FORMAT "-" SIZE_FORMAT,

@@ -1566,11 +1566,11 @@
 #endif  // #ifndef PRODUCT
 
 void PSParallelCompact::summary_phase(ParCompactionManager* cm,
                                       bool maximum_compaction)
 {
-  GCTraceTime(Trace, gc, phases) tm("Summary Phase", &_gc_timer);
+  GCTraceTime(Info, gc, phases) tm("Summary Phase", &_gc_timer);
 
 #ifdef  ASSERT
   if (TraceParallelOldGCMarkingPhase) {
     tty->print_cr("add_obj_count=" SIZE_FORMAT " "
                   "add_obj_bytes=" SIZE_FORMAT,

@@ -1582,11 +1582,11 @@
 #endif  // #ifdef ASSERT
 
   // Quick summarization of each space into itself, to see how much is live.
   summarize_spaces_quick();
 
-  log_develop_trace(gc, compaction, phases)("summary phase:  after summarizing each space to self");
+  log_develop_trace(gc, compaction)("summary phase:  after summarizing each space to self");
   NOT_PRODUCT(print_region_ranges());
   NOT_PRODUCT(print_initial_summary_data(_summary_data, _space_info));
 
   // The amount of live data that will end up in old space (assuming it fits).
   size_t old_space_total_live = 0;

@@ -1658,11 +1658,11 @@
       assert(done, "space must fit when compacted into itself");
       assert(*new_top_addr <= space->top(), "usage should not grow");
     }
   }
 
-  log_develop_trace(gc, compaction, phases)("Summary_phase:  after final summarization");
+  log_develop_trace(gc, compaction)("Summary_phase:  after final summarization");
   NOT_PRODUCT(print_region_ranges());
   NOT_PRODUCT(print_initial_summary_data(_summary_data, _space_info));
 }
 
 // This method should contain all heap-specific policy for invoking a full

@@ -2040,11 +2040,11 @@
 
 void PSParallelCompact::marking_phase(ParCompactionManager* cm,
                                       bool maximum_heap_compaction,
                                       ParallelOldTracer *gc_tracer) {
   // Recursively traverse all live objects and mark them
-  GCTraceTime(Trace, gc, phases) tm("Marking Phase", &_gc_timer);
+  GCTraceTime(Info, gc, phases) tm("Marking Phase", &_gc_timer);
 
   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
   uint parallel_gc_threads = heap->gc_task_manager()->workers();
   uint active_gc_threads = heap->gc_task_manager()->active_workers();
   TaskQueueSetSuper* qset = ParCompactionManager::region_array();

@@ -2055,11 +2055,11 @@
 
   // Need new claim bits before marking starts.
   ClassLoaderDataGraph::clear_claimed_marks();
 
   {
-    GCTraceTime(Trace, gc, phases) tm("Par Mark", &_gc_timer);
+    GCTraceTime(Debug, gc, phases) tm("Par Mark", &_gc_timer);
 
     ParallelScavengeHeap::ParStrongRootsScope psrs;
 
     GCTaskQueue* q = GCTaskQueue::create();
 

@@ -2084,11 +2084,11 @@
     gc_task_manager()->execute_and_wait(q);
   }
 
   // Process reference objects found during marking
   {
-    GCTraceTime(Trace, gc, phases) tm("Reference Processing", &_gc_timer);
+    GCTraceTime(Debug, gc, phases) tm("Reference Processing", &_gc_timer);
 
     ReferenceProcessorStats stats;
     if (ref_processor()->processing_is_mt()) {
       RefProcTaskExecutor task_executor;
       stats = ref_processor()->process_discovered_references(

@@ -2105,11 +2105,11 @@
 
   // This is the point where the entire marking should have completed.
   assert(cm->marking_stacks_empty(), "Marking should have completed");
 
   {
-    GCTraceTime(Debug, gc) tm_m("Class Unloading", &_gc_timer);
+    GCTraceTime(Debug, gc, phases) tm_m("Class Unloading", &_gc_timer);
 
     // Follow system dictionary roots and unload classes.
     bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
 
     // Unload nmethods.

@@ -2118,27 +2118,27 @@
     // Prune dead klasses from subklass/sibling/implementor lists.
     Klass::clean_weak_klass_links(is_alive_closure());
   }
 
   {
-    GCTraceTime(Debug, gc) t("Scrub String Table", &_gc_timer);
+    GCTraceTime(Debug, gc, phases) t("Scrub String Table", &_gc_timer);
     // Delete entries for dead interned strings.
     StringTable::unlink(is_alive_closure());
   }
 
   {
-    GCTraceTime(Debug, gc) t("Scrub Symbol Table", &_gc_timer);
+    GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", &_gc_timer);
     // Clean up unreferenced symbols in symbol table.
     SymbolTable::unlink();
   }
 
   _gc_tracer.report_object_count_after_gc(is_alive_closure());
 }
 
 void PSParallelCompact::adjust_roots(ParCompactionManager* cm) {
   // Adjust the pointers to reflect the new locations
-  GCTraceTime(Trace, gc, phases) tm("Adjust Roots", &_gc_timer);
+  GCTraceTime(Info, gc, phases) tm("Adjust Roots", &_gc_timer);
 
   // Need new claim bits when tracing through and adjusting pointers.
   ClassLoaderDataGraph::clear_claimed_marks();
 
   PSParallelCompact::AdjustPointerClosure oop_closure(cm);

@@ -2408,11 +2408,11 @@
   }
 }
 #endif // #ifdef ASSERT
 
 void PSParallelCompact::compact() {
-  GCTraceTime(Trace, gc, phases) tm("Compaction Phase", &_gc_timer);
+  GCTraceTime(Info, gc, phases) tm("Compaction Phase", &_gc_timer);
 
   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
   PSOldGen* old_gen = heap->old_gen();
   old_gen->start_array()->reset();
   uint parallel_gc_threads = heap->gc_task_manager()->workers();
< prev index next >