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

Unified Diff: src/heap/heap.cc

Issue 521873006: Trace idle notification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/heap/gc-idle-time-handler.cc ('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 e31a281e5345163826988032f4029a28cd19f260..6781711defa7fdb90813f2109a3ac25a11cc67a8 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4287,6 +4287,10 @@ bool Heap::WorthActivatingIncrementalMarking() {
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();
+ }
isolate()->counters()->gc_idle_time_allotted_in_ms()->AddSample(
idle_time_in_ms);
HistogramTimerScope idle_notification_scope(
@@ -4336,6 +4340,13 @@ bool Heap::IdleNotification(int idle_time_in_ms) {
result = true;
break;
}
+ 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();
+ PrintF("]\n");
+ }
return result;
}
« no previous file with comments | « src/heap/gc-idle-time-handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698