Add histograms for idle notification and incremental marking steps
authorjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 18 Jul 2014 08:25:41 +0000 (08:25 +0000)
committerjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 18 Jul 2014 08:25:41 +0000 (08:25 +0000)
BUG=381820
LOG=n
R=hpayer@chromium.org

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

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

src/counters.h
src/heap.cc

index 93079b1..4a35bf4 100644 (file)
@@ -292,18 +292,20 @@ class HistogramTimerScope BASE_EMBEDDED {
 };
 
 
-#define HISTOGRAM_TIMER_LIST(HT)                                      \
-  /* Garbage collection timers. */                                    \
-  HT(gc_compactor, V8.GCCompactor)                                    \
-  HT(gc_scavenger, V8.GCScavenger)                                    \
-  HT(gc_context, V8.GCContext) /* GC context cleanup time */          \
-  /* Parsing timers. */                                               \
-  HT(parse, V8.Parse)                                                 \
-  HT(parse_lazy, V8.ParseLazy)                                        \
-  HT(pre_parse, V8.PreParse)                                          \
-  /* Total compilation times. */                                      \
-  HT(compile, V8.Compile)                                             \
-  HT(compile_eval, V8.CompileEval)                                    \
+#define HISTOGRAM_TIMER_LIST(HT)                             \
+  /* Garbage collection timers. */                           \
+  HT(gc_compactor, V8.GCCompactor)                           \
+  HT(gc_scavenger, V8.GCScavenger)                           \
+  HT(gc_context, V8.GCContext) /* GC context cleanup time */ \
+  HT(gc_idle_notification, V8.GCIdleNotification)            \
+  HT(gc_incremental_marking, V8.GCIncrementalMarking)        \
+  /* Parsing timers. */                                      \
+  HT(parse, V8.Parse)                                        \
+  HT(parse_lazy, V8.ParseLazy)                               \
+  HT(pre_parse, V8.PreParse)                                 \
+  /* Total compilation times. */                             \
+  HT(compile, V8.Compile)                                    \
+  HT(compile_eval, V8.CompileEval)                           \
   HT(compile_lazy, V8.CompileLazy)
 
 #define HISTOGRAM_PERCENTAGE_LIST(HP)                                 \
index 16d7a80..fa67dc1 100644 (file)
@@ -4227,6 +4227,9 @@ void Heap::MakeHeapIterable() {
 
 
 void Heap::AdvanceIdleIncrementalMarking(intptr_t step_size) {
+  HistogramTimerScope idle_notification_scope(
+      isolate_->counters()->gc_incremental_marking());
+
   incremental_marking()->Step(step_size,
                               IncrementalMarking::NO_GC_VIA_STACK_GUARD);
 
@@ -4263,6 +4266,9 @@ bool Heap::IdleNotification(int hint) {
   intptr_t step_size =
       size_factor * IncrementalMarking::kAllocatedThreshold;
 
+  HistogramTimerScope idle_notification_scope(
+      isolate_->counters()->gc_idle_notification());
+
   if (contexts_disposed_ > 0) {
     contexts_disposed_ = 0;
     int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000);