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

Unified Diff: base/trace_event/memory_dump_session_state.h

Issue 2582453002: [tracing] Implement polling in MemoryDumpManager (Closed)
Patch Set: Nit. Created 3 years, 11 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 29a2da9b9f5500061fb6f636c27984fdc4a41d6a..46092cb4832d7d8d69f51cfadd143760c26b0b15 100644
--- a/base/trace_event/memory_dump_session_state.h
+++ b/base/trace_event/memory_dump_session_state.h
@@ -6,11 +6,12 @@
#define BASE_TRACE_EVENT_MEMORY_DUMP_SESSION_STATE_H_
#include <memory>
+#include <set>
#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"
+#include "base/trace_event/memory_dump_request_args.h"
namespace base {
namespace trace_event {
@@ -40,13 +41,18 @@ 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 SetAllowedDumpModes(
+ std::set<MemoryDumpLevelOfDetail> allowed_dump_modes);
+
+ bool IsDumpModeAllowed(MemoryDumpLevelOfDetail dump_mode) const;
- void SetMemoryDumpConfig(const TraceConfig::MemoryDumpConfig& config);
+ void set_heap_profiler_breakdown_threshold_bytes(uint32_t value) {
+ heap_profiler_breakdown_threshold_bytes_ = value;
+ }
- bool is_polling_enabled() { return is_polling_enabled_; }
+ uint32_t heap_profiler_breakdown_threshold_bytes() const {
+ return heap_profiler_breakdown_threshold_bytes_;
+ }
private:
friend class RefCountedThreadSafe<MemoryDumpSessionState>;
@@ -60,12 +66,9 @@ class BASE_EXPORT MemoryDumpSessionState
// 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_;
+ std::set<MemoryDumpLevelOfDetail> allowed_dump_modes_;
- // True if memory polling is enabled by the config in the tracing session.
- bool is_polling_enabled_;
+ uint32_t heap_profiler_breakdown_threshold_bytes_;
};
} // namespace trace_event

Powered by Google App Engine
This is Rietveld 408576698