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

Unified Diff: base/trace_event/trace_event_android.cc

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 | « base/trace_event/trace_event.gypi ('k') | base/trace_event/trace_event_argument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_event_android.cc
diff --git a/base/trace_event/trace_event_android.cc b/base/trace_event/trace_event_android.cc
index 26bd0c777d4be216db025546b9d2f4932e0b1395..465649d44d5acb5b4633ee6af72cf365148130f5 100644
--- a/base/trace_event/trace_event_android.cc
+++ b/base/trace_event/trace_event_android.cc
@@ -97,9 +97,9 @@ void TraceLog::StartATrace() {
PLOG(WARNING) << "Couldn't open " << kATraceMarkerFile;
return;
}
- SetEnabled(CategoryFilter(CategoryFilter::kDefaultCategoryFilterString),
- TraceLog::RECORDING_MODE,
- TraceOptions(RECORD_CONTINUOUSLY));
+ TraceConfig trace_config;
+ trace_config.SetTraceRecordMode(RECORD_CONTINUOUSLY);
+ SetEnabled(trace_config, TraceLog::RECORDING_MODE);
}
void TraceLog::StopATrace() {
@@ -187,8 +187,7 @@ void TraceLog::AddClockSyncMetadataEvent() {
// 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.
- TimeTicks now = TimeTicks::NowFromSystemTraceTime();
- double now_in_seconds = now.ToInternalValue() / 1000000.0;
+ double now_in_seconds = (TraceTicks::Now() - TraceTicks()).InSecondsF();
std::string marker = StringPrintf(
"trace_event_clock_sync: parent_ts=%f\n", now_in_seconds);
if (write(atrace_fd, marker.c_str(), marker.size()) == -1)
« no previous file with comments | « base/trace_event/trace_event.gypi ('k') | base/trace_event/trace_event_argument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698