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

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: Whitespace change Created 4 years, 7 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
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | base/trace_event/memory_dump_session_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f199ec1a2f9c9e8a07458366924996763fd0674c 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);
+ const TraceConfig::MemoryDumpConfig& memory_dump_config() const {
+ return memory_dump_config_;
+ }
+
+ void SetMemoryDumpConfig(const TraceConfig::MemoryDumpConfig& config);
+
private:
friend class RefCountedThreadSafe<MemoryDumpSessionState>;
~MemoryDumpSessionState();
@@ -50,6 +57,10 @@ 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_;
+
+ // The memory dump config, copied at the time when the tracing session was
+ // started.
+ TraceConfig::MemoryDumpConfig memory_dump_config_;
};
} // namespace trace_event
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | base/trace_event/memory_dump_session_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698