Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/heap/heap.cc

Issue 604543002: Only add samples to the idle time undershoot histogram if we actually did gc (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 4334 matching lines...) Expand 10 before | Expand all | Expand 10 after
4345 break; 4345 break;
4346 case DO_FINALIZE_SWEEPING: 4346 case DO_FINALIZE_SWEEPING:
4347 mark_compact_collector()->EnsureSweepingCompleted(); 4347 mark_compact_collector()->EnsureSweepingCompleted();
4348 break; 4348 break;
4349 case DO_NOTHING: 4349 case DO_NOTHING:
4350 break; 4350 break;
4351 } 4351 }
4352 4352
4353 int actual_time_ms = static_cast<int>(timer.Elapsed().InMilliseconds()); 4353 int actual_time_ms = static_cast<int>(timer.Elapsed().InMilliseconds());
4354 if (actual_time_ms <= idle_time_in_ms) { 4354 if (actual_time_ms <= idle_time_in_ms) {
4355 isolate()->counters()->gc_idle_time_limit_undershot()->AddSample( 4355 if (action.type != DONE && action.type != DO_NOTHING) {
4356 idle_time_in_ms - actual_time_ms); 4356 isolate()->counters()->gc_idle_time_limit_undershot()->AddSample(
4357 idle_time_in_ms - actual_time_ms);
4358 }
4357 } else { 4359 } else {
4358 isolate()->counters()->gc_idle_time_limit_overshot()->AddSample( 4360 isolate()->counters()->gc_idle_time_limit_overshot()->AddSample(
4359 actual_time_ms - idle_time_in_ms); 4361 actual_time_ms - idle_time_in_ms);
4360 } 4362 }
4361 4363
4362 if (FLAG_trace_idle_notification) { 4364 if (FLAG_trace_idle_notification) {
4363 PrintF("Idle notification: requested idle time %d ms, actual time %d ms [", 4365 PrintF("Idle notification: requested idle time %d ms, actual time %d ms [",
4364 idle_time_in_ms, actual_time_ms); 4366 idle_time_in_ms, actual_time_ms);
4365 action.Print(); 4367 action.Print();
4366 PrintF("]\n"); 4368 PrintF("]\n");
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
6141 static_cast<int>(object_sizes_last_time_[index])); 6143 static_cast<int>(object_sizes_last_time_[index]));
6142 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6144 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6143 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6145 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6144 6146
6145 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6147 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6146 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6148 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6147 ClearObjectStats(); 6149 ClearObjectStats();
6148 } 6150 }
6149 } 6151 }
6150 } // namespace v8::internal 6152 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698