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

Unified Diff: src/heap/memory-reducer.cc

Issue 2473073002: [heap] Print timestamp in memory reducer (Closed)
Patch Set: More prints Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/memory-reducer.cc
diff --git a/src/heap/memory-reducer.cc b/src/heap/memory-reducer.cc
index 926086fd4fd2e495f7e025ea60dbaf53306af76c..22d0b482666b69951ba53f472909f9b5114bc40e 100644
--- a/src/heap/memory-reducer.cc
+++ b/src/heap/memory-reducer.cc
@@ -35,9 +35,10 @@ void MemoryReducer::TimerTask::RunInternal() {
bool is_idle = js_call_rate < kJsCallsPerMsThreshold && low_allocation_rate;
bool optimize_for_memory = heap->ShouldOptimizeForMemoryUsage();
if (FLAG_trace_gc_verbose) {
- PrintIsolate(heap->isolate(), "Memory reducer: call rate %.3lf, %s, %s\n",
- js_call_rate, low_allocation_rate ? "low alloc" : "high alloc",
- optimize_for_memory ? "background" : "foreground");
+ heap->isolate()->PrintWithTimestamp(
+ "Memory reducer: call rate %.3lf, %s, %s\n", js_call_rate,
+ low_allocation_rate ? "low alloc" : "high alloc",
+ optimize_for_memory ? "background" : "foreground");
}
event.type = kTimer;
event.time_ms = time_ms;
@@ -70,8 +71,8 @@ void MemoryReducer::NotifyTimer(const Event& event) {
DCHECK(heap()->incremental_marking()->IsStopped());
DCHECK(FLAG_incremental_marking);
if (FLAG_trace_gc_verbose) {
- PrintIsolate(heap()->isolate(), "Memory reducer: started GC #%d\n",
- state_.started_gcs);
+ heap()->isolate()->PrintWithTimestamp("Memory reducer: started GC #%d\n",
+ state_.started_gcs);
}
heap()->StartIdleIncrementalMarking(
GarbageCollectionReason::kMemoryReducer);
@@ -93,8 +94,9 @@ void MemoryReducer::NotifyTimer(const Event& event) {
// Re-schedule the timer.
ScheduleTimer(event.time_ms, state_.next_gc_start_ms - event.time_ms);
if (FLAG_trace_gc_verbose) {
- PrintIsolate(heap()->isolate(), "Memory reducer: waiting for %.f ms\n",
- state_.next_gc_start_ms - event.time_ms);
+ heap()->isolate()->PrintWithTimestamp(
+ "Memory reducer: waiting for %.f ms\n",
+ state_.next_gc_start_ms - event.time_ms);
}
}
}
@@ -110,9 +112,9 @@ void MemoryReducer::NotifyMarkCompact(const Event& event) {
}
if (old_action == kRun) {
if (FLAG_trace_gc_verbose) {
- PrintIsolate(heap()->isolate(), "Memory reducer: finished GC #%d (%s)\n",
- state_.started_gcs,
- state_.action == kWait ? "will do more" : "done");
+ heap()->isolate()->PrintWithTimestamp(
+ "Memory reducer: finished GC #%d (%s)\n", state_.started_gcs,
+ state_.action == kWait ? "will do more" : "done");
}
}
}
« 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