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

Unified Diff: base/trace_event/memory_dump_session_state.h

Issue 1911643002: Add configurable limit to allocations in heap profiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving to use session state Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: base/trace_event/memory_dump_session_state.h
diff --git a/base/trace_event/memory_dump_session_state.h b/base/trace_event/memory_dump_session_state.h
index 7d871982e6e00229682dbf5838af8d3d9cea91ec..689b05ebb51729bfbb98202d7158fbbfc76f2a39 100644
--- a/base/trace_event/memory_dump_session_state.h
+++ b/base/trace_event/memory_dump_session_state.h
@@ -10,6 +10,7 @@
#include "base/base_export.h"
#include "base/trace_event/heap_profiler_stack_frame_deduplicator.h"
#include "base/trace_event/heap_profiler_type_name_deduplicator.h"
+#include "base/trace_event/trace_config.h"
namespace base {
namespace trace_event {
@@ -39,6 +40,12 @@ class BASE_EXPORT MemoryDumpSessionState
void SetTypeNameDeduplicator(
std::unique_ptr<TypeNameDeduplicator> type_name_deduplicator);
+ TraceConfig::MemoryDumpConfig memory_dump_config() const {
Primiano Tucci (use gerrit) 2016/04/22 14:18:29 I'd return a const TraceConfig::MemoryDumpConfig&
Maria 2016/04/25 18:37:23 Done.
+ return memory_dump_config_;
+ }
+
+ void SetMemoryDumpConfig(TraceConfig::MemoryDumpConfig config);
Primiano Tucci (use gerrit) 2016/04/22 14:18:29 make the argument a const& ref so you avoid doing
Maria 2016/04/25 18:37:23 Done.
+
private:
friend class RefCountedThreadSafe<MemoryDumpSessionState>;
~MemoryDumpSessionState();
@@ -50,6 +57,9 @@ class BASE_EXPORT MemoryDumpSessionState
// Deduplicates type names in heap dumps so they can be written once when the
// trace is finalized.
std::unique_ptr<TypeNameDeduplicator> type_name_deduplicator_;
+
+ // A set of configurations for this session.
Primiano Tucci (use gerrit) 2016/04/22 14:18:29 I'd say: The memory dump config, copied at the tim
Maria 2016/04/25 18:37:23 Done.
+ TraceConfig::MemoryDumpConfig memory_dump_config_;
};
} // namespace trace_event

Powered by Google App Engine
This is Rietveld 408576698