Index: base/trace_event/memory_dump_scheduler.h |
diff --git a/base/trace_event/memory_dump_scheduler.h b/base/trace_event/memory_dump_scheduler.h |
index b063734fce8afdee20aa4aad1668b3c2354e27f7..dc0c6ba97b795f3099615209c4e28e917b474d51 100644 |
--- a/base/trace_event/memory_dump_scheduler.h |
+++ b/base/trace_event/memory_dump_scheduler.h |
@@ -41,6 +41,10 @@ class BASE_EXPORT MemoryDumpScheduler { |
// Starts polling memory total. |
void NotifyPollingSupported(); |
+ // Resets time for triggering dump to account for minimum time between the |
+ // dumps. |
+ void NotifyDumpTriggered(); |
+ |
// Disables all triggers. |
void DisableAllTriggers(); |
@@ -68,14 +72,22 @@ class BASE_EXPORT MemoryDumpScheduler { |
}; |
struct PollingTriggerState { |
+ enum State { |
+ CONFIGURED, // Polling trigger was added. |
+ ENABLED, // Polling is running. |
+ DISABLED // Polling is disabled. |
+ }; |
+ |
static const uint32_t kNumTotalsTrackedForPeakDetection = 50; |
explicit PollingTriggerState( |
scoped_refptr<SingleThreadTaskRunner> polling_task_runner); |
~PollingTriggerState(); |
- bool is_configured; |
- bool is_polling_enabled; |
+ // Helper to clear the tracked memory totals and poll count from last dump. |
+ void ResetTotals(); |
+ |
+ State current_state; |
MemoryDumpLevelOfDetail level_of_detail; |
scoped_refptr<SingleThreadTaskRunner> polling_task_runner; |