Added more detailed sweeping timing counters.
authorhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 26 Jun 2014 12:56:14 +0000 (12:56 +0000)
committerhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 26 Jun 2014 12:56:14 +0000 (12:56 +0000)
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/331053003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/heap.cc
src/heap.h
src/mark-compact.cc

index d4fc8fc..a31d664 100644 (file)
@@ -6121,6 +6121,9 @@ GCTracer::~GCTracer() {
     PrintF("sweep=%.2f ", scopes_[Scope::MC_SWEEP]);
     PrintF("sweepns=%.2f ", scopes_[Scope::MC_SWEEP_NEWSPACE]);
     PrintF("sweepos=%.2f ", scopes_[Scope::MC_SWEEP_OLDSPACE]);
+    PrintF("sweepcode=%.2f ", scopes_[Scope::MC_SWEEP_CODE]);
+    PrintF("sweepcell=%.2f ", scopes_[Scope::MC_SWEEP_CELL]);
+    PrintF("sweepmap=%.2f ", scopes_[Scope::MC_SWEEP_MAP]);
     PrintF("evacuate=%.1f ", scopes_[Scope::MC_EVACUATE_PAGES]);
     PrintF("new_new=%.1f ", scopes_[Scope::MC_UPDATE_NEW_TO_NEW_POINTERS]);
     PrintF("root_new=%.1f ", scopes_[Scope::MC_UPDATE_ROOT_TO_NEW_POINTERS]);
index 8a8dbae..85af3c9 100644 (file)
@@ -2507,6 +2507,9 @@ class GCTracer BASE_EMBEDDED {
       MC_SWEEP,
       MC_SWEEP_NEWSPACE,
       MC_SWEEP_OLDSPACE,
+      MC_SWEEP_CODE,
+      MC_SWEEP_CELL,
+      MC_SWEEP_MAP,
       MC_EVACUATE_PAGES,
       MC_UPDATE_NEW_TO_NEW_POINTERS,
       MC_UPDATE_ROOT_TO_NEW_POINTERS,
index b7575b3..2e05171 100644 (file)
@@ -4224,17 +4224,24 @@ void MarkCompactCollector::SweepSpaces() {
     }
   }
   RemoveDeadInvalidatedCode();
-  SweepSpace(heap()->code_space(), PRECISE);
 
-  SweepSpace(heap()->cell_space(), PRECISE);
-  SweepSpace(heap()->property_cell_space(), PRECISE);
+  { GCTracer::Scope sweep_scope(tracer_, GCTracer::Scope::MC_SWEEP_CODE);
+    SweepSpace(heap()->code_space(), PRECISE);
+  }
+
+  { GCTracer::Scope sweep_scope(tracer_, GCTracer::Scope::MC_SWEEP_CELL);
+    SweepSpace(heap()->cell_space(), PRECISE);
+    SweepSpace(heap()->property_cell_space(), PRECISE);
+  }
 
   EvacuateNewSpaceAndCandidates();
 
   // ClearNonLiveTransitions depends on precise sweeping of map space to
   // detect whether unmarked map became dead in this collection or in one
   // of the previous ones.
-  SweepSpace(heap()->map_space(), PRECISE);
+  { GCTracer::Scope sweep_scope(tracer_, GCTracer::Scope::MC_SWEEP_MAP);
+    SweepSpace(heap()->map_space(), PRECISE);
+  }
 
   // Deallocate unmarked objects and clear marked bits for marked objects.
   heap_->lo_space()->FreeUnmarkedObjects();