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

Unified Diff: base/debug/trace_event_impl.cc

Issue 9474023: Sync trace time on Chrome OS (just like Android) (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: fixup comments Created 8 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.cc
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc
index 1f23c369014932f097753dd10af062693292f1fe..b23f5952664d08dabd3292b3b557bd0f65ec6b37 100644
--- a/base/debug/trace_event_impl.cc
+++ b/base/debug/trace_event_impl.cc
@@ -683,11 +683,11 @@ void TraceLog::AddTraceEventEtw(char phase,
}
void TraceLog::AddClockSyncMetadataEvents() {
-#if defined(OS_ANDROID)
- // Since Android does not support sched_setaffinity, we cannot establish clock
- // sync unless the scheduler clock is set to global. If the trace_clock file
- // can't be read, we will assume the kernel doesn't support tracing and do
- // nothing.
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
+ // Since Android/ChromeOS do not support sched_setaffinity, we cannot
+ // establish clock sync unless the scheduler clock is set to global.
+ // If the trace_clock file can't be read, we will assume the kernel
+ // doesn't support tracing and do nothing.
std::string clock_mode;
if (!file_util::ReadFileToString(
FilePath("/sys/kernel/debug/tracing/trace_clock"),
@@ -702,7 +702,7 @@ void TraceLog::AddClockSyncMetadataEvents() {
return;
}
- // Android's kernel trace system has a trace_marker feature: this is a file on
+ // Linux's kernel trace system has a trace_marker feature: this is a file on
// debugfs that takes the written data and pushes it onto the trace
// buffer. So, to establish clock sync, we write our monotonic clock into that
// trace buffer.
« 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