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

Side by Side Diff: base/trace_event/trace_config.h

Issue 2323483005: [tracing] Add filtering mode in TraceLog (Closed)
Patch Set: SetEnabled takes a bitmap. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_TRACE_EVENT_TRACE_CONFIG_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_CONFIG_H_
6 #define BASE_TRACE_EVENT_TRACE_CONFIG_H_ 6 #define BASE_TRACE_EVENT_TRACE_CONFIG_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Reset the options to default. 65 // Reset the options to default.
66 void Clear(); 66 void Clear();
67 67
68 uint32_t breakdown_threshold_bytes; 68 uint32_t breakdown_threshold_bytes;
69 }; 69 };
70 70
71 // Reset the values in the config. 71 // Reset the values in the config.
72 void Clear(); 72 void Clear();
73 73
74 void Merge(const MemoryDumpConfig& config);
75
74 // Set of memory dump modes allowed for the tracing session. The explicitly 76 // Set of memory dump modes allowed for the tracing session. The explicitly
75 // triggered dumps will be successful only if the dump mode is allowed in 77 // triggered dumps will be successful only if the dump mode is allowed in
76 // the config. 78 // the config.
77 std::set<MemoryDumpLevelOfDetail> allowed_dump_modes; 79 std::set<MemoryDumpLevelOfDetail> allowed_dump_modes;
78 80
79 std::vector<Trigger> triggers; 81 std::vector<Trigger> triggers;
80 HeapProfiler heap_profiler_options; 82 HeapProfiler heap_profiler_options;
81 }; 83 };
82 84
83 class EventFilterConfig { 85 class EventFilterConfig {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 void Clear(); 235 void Clear();
234 236
235 // Clears and resets the memory dump config. 237 // Clears and resets the memory dump config.
236 void ResetMemoryDumpConfig(const MemoryDumpConfig& memory_dump_config); 238 void ResetMemoryDumpConfig(const MemoryDumpConfig& memory_dump_config);
237 239
238 const MemoryDumpConfig& memory_dump_config() const { 240 const MemoryDumpConfig& memory_dump_config() const {
239 return memory_dump_config_; 241 return memory_dump_config_;
240 } 242 }
241 243
242 const EventFilters& event_filters() const { return event_filters_; } 244 const EventFilters& event_filters() const { return event_filters_; }
245 void SetEventFilterConfigs(const EventFilters& filter_configs) {
246 event_filters_ = filter_configs;
247 }
243 248
244 private: 249 private:
245 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidLegacyFormat); 250 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidLegacyFormat);
246 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, 251 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest,
247 TraceConfigFromInvalidLegacyStrings); 252 TraceConfigFromInvalidLegacyStrings);
248 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidString); 253 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidString);
249 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromInvalidString); 254 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromInvalidString);
250 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, 255 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest,
251 IsEmptyOrContainsLeadingOrTrailingWhitespace); 256 IsEmptyOrContainsLeadingOrTrailingWhitespace);
252 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromMemoryConfigString); 257 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromMemoryConfigString);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 StringList disabled_categories_; 317 StringList disabled_categories_;
313 StringList excluded_categories_; 318 StringList excluded_categories_;
314 StringList synthetic_delays_; 319 StringList synthetic_delays_;
315 EventFilters event_filters_; 320 EventFilters event_filters_;
316 }; 321 };
317 322
318 } // namespace trace_event 323 } // namespace trace_event
319 } // namespace base 324 } // namespace base
320 325
321 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_ 326 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698