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

Unified Diff: webrtc/base/event_tracer.cc

Issue 1746693002: Trace tracing Start/Stop events. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add thread checks Created 4 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: webrtc/base/event_tracer.cc
diff --git a/webrtc/base/event_tracer.cc b/webrtc/base/event_tracer.cc
index 4174589d366a48cf4d20d7cc1bceb8fc0eb3ca4f..9e777a85cef0a30fd62670ee82802a2ac87ce856 100644
--- a/webrtc/base/event_tracer.cc
+++ b/webrtc/base/event_tracer.cc
@@ -139,6 +139,7 @@ class EventLogger final {
}
void Start(FILE* file, bool owned) {
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
RTC_DCHECK(file);
RTC_DCHECK(!output_file_);
output_file_ = file;
@@ -158,9 +159,12 @@ class EventLogger final {
// Finally start, everything should be set up now.
logging_thread_.Start();
+ TRACE_EVENT_INSTANT0("webrtc", "EventLogger::Start");
}
void Stop() {
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ TRACE_EVENT_INSTANT0("webrtc", "EventLogger::Stop");
// Try to stop. Abort if we're not currently logging.
if (rtc::AtomicOps::CompareAndSwap(&g_event_logging_active, 1, 0) == 0)
return;
« 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