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

Unified Diff: src/log.cc

Issue 149611: Add heap log processing script originally written by Kevin. (Closed)
Patch Set: Created 11 years, 5 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 | « no previous file | tools/process-heap-prof.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 2ca89dd468060990aaeffa339d18af8b06932c32..16f3fb5bf81044be2147322d2442fd90291be6cf 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -843,7 +843,12 @@ void Logger::HeapSampleBeginEvent(const char* space, const char* kind) {
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::IsEnabled() || !FLAG_log_gc) return;
LogMessageBuilder msg;
- msg.Append("heap-sample-begin,\"%s\",\"%s\"\n", space, kind);
+ msg.Append("heap-sample-begin,\"%s\",\"%s\"", space, kind);
+ uint32_t sec, usec;
+ if (OS::GetUserTime(&sec, &usec) != -1) {
+ msg.Append(",%d,%d", sec, usec);
+ }
+ msg.Append('\n');
msg.WriteToLogFile();
#endif
}
« no previous file with comments | « no previous file | tools/process-heap-prof.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698