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

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

Issue 2323483005: [tracing] Add filtering mode in TraceLog (Closed)
Patch Set: Fixes. Created 4 years, 3 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
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | base/trace_event/trace_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 void Clear(); 238 void Clear();
237 239
238 // Clears and resets the memory dump config. 240 // Clears and resets the memory dump config.
239 void ResetMemoryDumpConfig(const MemoryDumpConfig& memory_dump_config); 241 void ResetMemoryDumpConfig(const MemoryDumpConfig& memory_dump_config);
240 242
241 const MemoryDumpConfig& memory_dump_config() const { 243 const MemoryDumpConfig& memory_dump_config() const {
242 return memory_dump_config_; 244 return memory_dump_config_;
243 } 245 }
244 246
245 const EventFilters& event_filters() const { return event_filters_; } 247 const EventFilters& event_filters() const { return event_filters_; }
248 void SetEventFilterConfigs(EventFilters filter_configs) {
oystein (OOO til 10th of July) 2016/09/22 20:16:42 const EventFilters&?
249 event_filters_ = filter_configs;
250 }
246 251
247 private: 252 private:
248 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidLegacyFormat); 253 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidLegacyFormat);
249 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, 254 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest,
250 TraceConfigFromInvalidLegacyStrings); 255 TraceConfigFromInvalidLegacyStrings);
251 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidString); 256 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidString);
252 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromInvalidString); 257 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromInvalidString);
253 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, 258 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest,
254 IsEmptyOrContainsLeadingOrTrailingWhitespace); 259 IsEmptyOrContainsLeadingOrTrailingWhitespace);
255 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromMemoryConfigString); 260 FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromMemoryConfigString);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 StringList disabled_categories_; 321 StringList disabled_categories_;
317 StringList excluded_categories_; 322 StringList excluded_categories_;
318 StringList synthetic_delays_; 323 StringList synthetic_delays_;
319 EventFilters event_filters_; 324 EventFilters event_filters_;
320 }; 325 };
321 326
322 } // namespace trace_event 327 } // namespace trace_event
323 } // namespace base 328 } // namespace base
324 329
325 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_ 330 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | base/trace_event/trace_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698