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

Unified Diff: base/debug/trace_event_impl.h

Issue 12096115: Update tracing framework to optionally use a ringbuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | base/debug/trace_event_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.h
diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h
index f405e00116463b52bb53e00946c40cfd58ebb1a6..8e044d3a6661f4b96fb06e84fc09f6c2fd360ab4 100644
--- a/base/debug/trace_event_impl.h
+++ b/base/debug/trace_event_impl.h
@@ -208,6 +208,11 @@ class BASE_EXPORT TraceLog {
void SetEnabled(bool enabled);
bool IsEnabled() { return !!enable_count_; }
+ void SetContinuousTracing(bool continuous_tracing) {
nduca 2013/02/12 19:42:22 I like it, but can we make it a mode and a require
dsinclair 2013/02/25 19:04:34 Done.
+ continuous_tracing_ = continuous_tracing;
+ }
+ bool GetContinuousTracing() { return continuous_tracing_; }
+
#if defined(OS_ANDROID)
static void InitATrace();
#endif
@@ -364,6 +369,8 @@ class BASE_EXPORT TraceLog {
static void ApplyATraceEnabledFlag(unsigned char* category_enabled);
#endif
+ void AddEvent(const TraceEvent& event);
+
// TODO(nduca): switch to per-thread trace buffers to reduce thread
// synchronization.
// This lock protects TraceLog member accesses from arbitrary threads.
@@ -371,6 +378,9 @@ class BASE_EXPORT TraceLog {
int enable_count_;
NotificationCallback notification_callback_;
std::vector<TraceEvent> logged_events_;
+ bool continuous_tracing_;
nduca 2013/02/12 19:42:22 Hm... can you factor out logged_events and logged_
dsinclair 2013/02/15 19:38:55 Done.
+ uint32 logged_events_newest_;
+ uint32 logged_events_oldest_;
std::vector<std::string> included_categories_;
std::vector<std::string> excluded_categories_;
bool dispatching_to_observer_list_;
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698