Fix sampling of V8.DetachedContextAgeInGC histogram.
authorulan <ulan@chromium.org>
Wed, 18 Feb 2015 13:50:41 +0000 (05:50 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 18 Feb 2015 13:50:58 +0000 (13:50 +0000)
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26719}

src/isolate.cc

index a1a6f4f..2c8367d 100644 (file)
@@ -2594,9 +2594,8 @@ void Isolate::CheckDetachedContextsAfterGC() {
       detached_contexts->set(new_length, Smi::FromInt(mark_sweeps + 1));
       detached_contexts->set(new_length + 1, cell);
       new_length += 2;
-    } else {
-      counters()->detached_context_age_in_gc()->AddSample(mark_sweeps);
     }
+    counters()->detached_context_age_in_gc()->AddSample(mark_sweeps + 1);
   }
   if (FLAG_trace_detached_contexts) {
     PrintF("%d detached contexts are collected out of %d\n",