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

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

Issue 2259493003: [tracing] Add trace events filtering predicate for heap profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@heap_prof_filter
Patch Set: Primiano's comments. 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/trace_event_unittest.cc ('k') | base/trace_event/trace_log.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_LOG_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_
6 #define BASE_TRACE_EVENT_TRACE_LOG_H_ 6 #define BASE_TRACE_EVENT_TRACE_LOG_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 uint64_t MangleEventId(uint64_t id); 306 uint64_t MangleEventId(uint64_t id);
307 307
308 // Exposed for unittesting: 308 // Exposed for unittesting:
309 309
310 void WaitSamplingEventForTesting(); 310 void WaitSamplingEventForTesting();
311 311
312 // Allows deleting our singleton instance. 312 // Allows deleting our singleton instance.
313 static void DeleteForTesting(); 313 static void DeleteForTesting();
314 314
315 class TraceEventFilter { 315 class BASE_EXPORT TraceEventFilter {
316 public: 316 public:
317 static const char* const kEventWhitelistPredicate;
318 static const char* const kHeapProfilerPredicate;
319
317 TraceEventFilter() {} 320 TraceEventFilter() {}
318 virtual ~TraceEventFilter() {} 321 virtual ~TraceEventFilter() {}
319 virtual bool FilterTraceEvent(const TraceEvent& trace_event) const = 0; 322 virtual bool FilterTraceEvent(const TraceEvent& trace_event) const = 0;
320 virtual void EndEvent(const char* category_group, const char* name) {} 323 virtual void EndEvent(const char* category_group, const char* name) {}
321 324
322 private: 325 private:
323 DISALLOW_COPY_AND_ASSIGN(TraceEventFilter); 326 DISALLOW_COPY_AND_ASSIGN(TraceEventFilter);
324 }; 327 };
325 typedef std::unique_ptr<TraceEventFilter> ( 328 typedef std::unique_ptr<TraceEventFilter> (
326 *TraceEventFilterConstructorForTesting)(void); 329 *TraceEventFilterConstructorForTesting)(void);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 subtle::AtomicWord generation_; 547 subtle::AtomicWord generation_;
545 bool use_worker_thread_; 548 bool use_worker_thread_;
546 549
547 DISALLOW_COPY_AND_ASSIGN(TraceLog); 550 DISALLOW_COPY_AND_ASSIGN(TraceLog);
548 }; 551 };
549 552
550 } // namespace trace_event 553 } // namespace trace_event
551 } // namespace base 554 } // namespace base
552 555
553 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ 556 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_unittest.cc ('k') | base/trace_event/trace_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698