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

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

Issue 2549103003: tracing: split trace event filter classes out of TraceLog (Closed)
Patch Set: Add BASE_EXPORT Created 4 years 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_TRACE_EVENT_HEAP_PROFILER_EVENT_FILTER_H_
6 #define BASE_TRACE_EVENT_HEAP_PROFILER_EVENT_FILTER_H_
7
8 #include "base/base_export.h"
9 #include "base/macros.h"
10 #include "base/trace_event/trace_event_filter.h"
11
12 namespace base {
13 namespace trace_event {
14
15 class TraceEvent;
16
17 // This filter unconditionally accepts all events and pushes/pops them from the
18 // thread-local AllocationContextTracker instance as they are seen.
19 // This is used to cheaply construct the heap profiler pseudo stack without
20 // having to actually record all events.
21 class BASE_EXPORT HeapProfilerEventFilter : public TraceEventFilter {
22 public:
23 static const char kName[];
24
25 HeapProfilerEventFilter();
26 ~HeapProfilerEventFilter() override;
27
28 // TraceEventFilter implementation.
29 bool FilterTraceEvent(const TraceEvent& trace_event) const override;
30 void EndEvent(const char* category_name,
31 const char* event_name) const override;
32
33 private:
34 DISALLOW_COPY_AND_ASSIGN(HeapProfilerEventFilter);
35 };
36
37 } // namespace trace_event
38 } // namespace base
39
40 #endif // BASE_TRACE_EVENT_HEAP_PROFILER_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « base/trace_event/event_name_filter_unittest.cc ('k') | base/trace_event/heap_profiler_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698