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

Unified Diff: base/trace_event/trace_log.h

Issue 2452063003: tracing: split out the CategoryRegistry from the TraceLog (Closed)
Patch Set: add tests, rebase Created 4 years, 1 month 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.h ('k') | base/trace_event/trace_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_log.h
diff --git a/base/trace_event/trace_log.h b/base/trace_event/trace_log.h
index 6fabd730a803065effe11adbdbceb02aba3098f1..e5d80d6465ce160dea8b4a74c6f67d2bc181e675 100644
--- a/base/trace_event/trace_log.h
+++ b/base/trace_event/trace_log.h
@@ -30,6 +30,7 @@ class RefCountedString;
namespace trace_event {
+struct TraceCategory;
class TraceBuffer;
class TraceBufferChunk;
class TraceEvent;
@@ -54,21 +55,6 @@ class BASE_EXPORT TraceLog : public MemoryDumpProvider {
FILTERING_MODE = 1 << 1
};
- // The pointer returned from GetCategoryGroupEnabledInternal() points to a
- // value with zero or more of the following bits. Used in this class only.
- // The TRACE_EVENT macros should only use the value as a bool.
- // These values must be in sync with macro values in TraceEvent.h in Blink.
- enum CategoryGroupEnabledFlags {
- // Category group enabled for the recording mode.
- ENABLED_FOR_RECORDING = 1 << 0,
- // 1 << 2 was used for ENABLED_FOR_EVENT_CALLBACK.
-
- // Category group enabled to export events to ETW.
- ENABLED_FOR_ETW_EXPORT = 1 << 3,
- // Category group being filtered before logged.
- ENABLED_FOR_FILTERING = 1 << 4
- };
-
static TraceLog* GetInstance();
// Get set of known category groups. This can change as new code paths are
@@ -382,8 +368,8 @@ class BASE_EXPORT TraceLog : public MemoryDumpProvider {
// Enable the category group in the recording mode if category_filter_ matches
// the category group, is not null. Enable category for filtering if any
// filter in event_filters_enabled_ enables it.
- void UpdateCategoryGroupEnabledFlags();
- void UpdateCategoryGroupEnabledFlag(size_t category_index);
+ void UpdateCategoryRegistry();
+ void UpdateCategoryState(TraceCategory* category);
void CreateFiltersForTraceConfig();
@@ -400,7 +386,6 @@ class BASE_EXPORT TraceLog : public MemoryDumpProvider {
TraceLog();
~TraceLog() override;
- const unsigned char* GetCategoryGroupEnabledInternal(const char* name);
void AddMetadataEventsWhileLocked();
InternalTraceOptions trace_options() const {
« no previous file with comments | « base/trace_event/trace_event.h ('k') | base/trace_event/trace_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698