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

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

Issue 2537363003: [memory-infra] Add support for polling memory totals in MemoryDumpManager (Closed)
Patch Set: nits. 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
« no previous file with comments | « base/trace_event/memory_dump_provider.h ('k') | base/trace_event/memory_dump_session_state.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_MEMORY_DUMP_SESSION_STATE_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_SESSION_STATE_H_
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_SESSION_STATE_H_ 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_SESSION_STATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 28 matching lines...) Expand all
39 39
40 void SetTypeNameDeduplicator( 40 void SetTypeNameDeduplicator(
41 std::unique_ptr<TypeNameDeduplicator> type_name_deduplicator); 41 std::unique_ptr<TypeNameDeduplicator> type_name_deduplicator);
42 42
43 const TraceConfig::MemoryDumpConfig& memory_dump_config() const { 43 const TraceConfig::MemoryDumpConfig& memory_dump_config() const {
44 return memory_dump_config_; 44 return memory_dump_config_;
45 } 45 }
46 46
47 void SetMemoryDumpConfig(const TraceConfig::MemoryDumpConfig& config); 47 void SetMemoryDumpConfig(const TraceConfig::MemoryDumpConfig& config);
48 48
49 bool is_polling_enabled() { return is_polling_enabled_; }
50
49 private: 51 private:
50 friend class RefCountedThreadSafe<MemoryDumpSessionState>; 52 friend class RefCountedThreadSafe<MemoryDumpSessionState>;
51 ~MemoryDumpSessionState(); 53 ~MemoryDumpSessionState();
52 54
53 // Deduplicates backtraces in heap dumps so they can be written once when the 55 // Deduplicates backtraces in heap dumps so they can be written once when the
54 // trace is finalized. 56 // trace is finalized.
55 std::unique_ptr<StackFrameDeduplicator> stack_frame_deduplicator_; 57 std::unique_ptr<StackFrameDeduplicator> stack_frame_deduplicator_;
56 58
57 // Deduplicates type names in heap dumps so they can be written once when the 59 // Deduplicates type names in heap dumps so they can be written once when the
58 // trace is finalized. 60 // trace is finalized.
59 std::unique_ptr<TypeNameDeduplicator> type_name_deduplicator_; 61 std::unique_ptr<TypeNameDeduplicator> type_name_deduplicator_;
60 62
61 // The memory dump config, copied at the time when the tracing session was 63 // The memory dump config, copied at the time when the tracing session was
62 // started. 64 // started.
63 TraceConfig::MemoryDumpConfig memory_dump_config_; 65 TraceConfig::MemoryDumpConfig memory_dump_config_;
66
67 // True if memory polling is enabled by the config in the tracing session.
68 bool is_polling_enabled_;
64 }; 69 };
65 70
66 } // namespace trace_event 71 } // namespace trace_event
67 } // namespace base 72 } // namespace base
68 73
69 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_SESSION_STATE_H_ 74 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_SESSION_STATE_H_
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_provider.h ('k') | base/trace_event/memory_dump_session_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698