Commit c87651f0 authored by jochen@chromium.org's avatar jochen@chromium.org

Only add samples to the idle time undershoot histogram if we actually did gc

BUG=none
R=hpayer@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0e2ae4b7
......@@ -4352,8 +4352,10 @@ bool Heap::IdleNotification(int idle_time_in_ms) {
int actual_time_ms = static_cast<int>(timer.Elapsed().InMilliseconds());
if (actual_time_ms <= idle_time_in_ms) {
isolate()->counters()->gc_idle_time_limit_undershot()->AddSample(
idle_time_in_ms - actual_time_ms);
if (action.type != DONE && action.type != DO_NOTHING) {
isolate()->counters()->gc_idle_time_limit_undershot()->AddSample(
idle_time_in_ms - actual_time_ms);
}
} else {
isolate()->counters()->gc_idle_time_limit_overshot()->AddSample(
actual_time_ms - idle_time_in_ms);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment