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

Unified Diff: base/trace_event/memory_dump_manager.h

Issue 2041583003: [tracing] Introduce "allowed_dump_modes" for memory dump config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@background_config
Patch Set: rebase on 2049143002 Created 4 years, 6 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 | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | base/trace_event/memory_dump_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_dump_manager.h
diff --git a/base/trace_event/memory_dump_manager.h b/base/trace_event/memory_dump_manager.h
index fd2226ae6c7e7b69db119b56cce22f52512f5807..b5c3a157a82d8504abd24fdfa350708da619b07b 100644
--- a/base/trace_event/memory_dump_manager.h
+++ b/base/trace_event/memory_dump_manager.h
@@ -115,6 +115,9 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
void OnTraceLogEnabled() override;
void OnTraceLogDisabled() override;
+ // Returns true if the dump mode is allowed for current tracing session.
+ bool IsDumpModeAllowed(MemoryDumpLevelOfDetail dump_mode) const;
+
// Returns the MemoryDumpSessionState object, which is shared by all the
// ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing
// session lifetime.
@@ -272,7 +275,7 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
// the dump triggers from trace config.
class BASE_EXPORT PeriodicGlobalDumpTimer {
public:
- PeriodicGlobalDumpTimer();
+ explicit PeriodicGlobalDumpTimer(MemoryDumpManager* mdm);
~PeriodicGlobalDumpTimer();
void Start(const std::vector<TraceConfig::MemoryDumpConfig::Trigger>&
@@ -285,6 +288,8 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
// Periodically called by the timer.
void RequestPeriodicGlobalDump();
+ MemoryDumpManager* mdm_;
+
RepeatingTimer timer_;
uint32_t periodic_dumps_count_;
uint32_t light_dump_rate_;
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | base/trace_event/memory_dump_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698