Reviewers: ulan,

Description:
Added more detailed sweeping timing counters.

BUG=

Please review this at https://codereview.chromium.org/331053003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+17, -4 lines):
  M src/heap.h
  M src/heap.cc
  M src/mark-compact.cc


Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index d4fc8fc0a9f537c287af1deae5fd2ddd2c981da1..a31d664a5dfb76bf11220082fc52e49869194343 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -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: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 8a8dbae068b162e7b7b3de20e5f1ad8973706756..85af3c93adab9742de436f2fd338a2f5b2428f26 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -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: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index b7575b3ab2a8faa3ca6de69b60c839e418f745b0..2e05171a779855e3b0fcfb945c96bc0cf79ced5c 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -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();


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to