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

Unified Diff: src/heap/heap.cc

Issue 572293002: Track how much we miss the idle notification limit (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/counters.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index c96ea97f1b026b0079d676112ee24dc51cb0927b..97445a61e69094bb6b2a30c72ba561f704f132d9 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4290,9 +4290,7 @@ bool Heap::IdleNotification(int idle_time_in_ms) {
// If incremental marking is off, we do not perform idle notification.
if (!FLAG_incremental_marking) return true;
base::ElapsedTimer timer;
- if (FLAG_trace_idle_notification) {
- timer.Start();
- }
+ timer.Start();
isolate()->counters()->gc_idle_time_allotted_in_ms()->AddSample(
idle_time_in_ms);
HistogramTimerScope idle_notification_scope(
@@ -4348,8 +4346,17 @@ bool Heap::IdleNotification(int idle_time_in_ms) {
case DO_NOTHING:
break;
}
+
+ 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);
+ } else {
+ isolate()->counters()->gc_idle_time_limit_overshot()->AddSample(
+ actual_time_ms - idle_time_in_ms);
+ }
+
if (FLAG_trace_idle_notification) {
- int actual_time_ms = static_cast<int>(timer.Elapsed().InMilliseconds());
PrintF("Idle notification: requested idle time %d ms, actual time %d ms [",
idle_time_in_ms, actual_time_ms);
action.Print();
« no previous file with comments | « src/counters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698