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

Unified Diff: base/trace_event/trace_log.cc

Issue 2820433005: memory-infra: Start disentangling tracing from memory-infra (Closed)
Patch Set: Created 3 years, 8 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
Index: base/trace_event/trace_log.cc
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc
index 07d124c4fe46f7a169b1a5243cb3b71e8e122110..ee97b959f2654f58998684b27cde135be5dcdc4a 100644
--- a/base/trace_event/trace_log.cc
+++ b/base/trace_event/trace_log.cc
@@ -755,6 +755,10 @@ void TraceLog::SetDisabledWhileLocked(uint8_t modes_to_disable) {
dispatching_to_observer_list_ = false;
}
+bool TraceLog::IsEnabled() {
+ return enabled_modes_ & RECORDING_MODE;
+}
hjd 2017/04/13 14:16:59 Can't be inline if IsEnabled is virtual.
+
int TraceLog::GetNumTracesRecorded() {
AutoLock lock(lock_);
if (!IsEnabled())

Powered by Google App Engine
This is Rietveld 408576698