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

Unified Diff: base/trace_event/memory_dump_manager.h

Issue 1152743003: Making the MemoryDumpManager less aggressive in disabling dump providers on failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 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') | no next file with comments »
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 3645ac18ba414e56f42c694e4a5507688dfc122d..e34bdb0853cc6200d3a494969fe8582eb2040f79 100644
--- a/base/trace_event/memory_dump_manager.h
+++ b/base/trace_event/memory_dump_manager.h
@@ -90,6 +90,8 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
~MemoryDumpProviderInfo();
scoped_refptr<SingleThreadTaskRunner> task_runner; // Optional.
+ int consecutive_failures; // Number of times the provider failed (to
+ // disable the MDPs).
bool disabled; // For fail-safe logic (auto-disable failing MDPs).
};
@@ -97,6 +99,9 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
friend struct DefaultSingletonTraits<MemoryDumpManager>;
friend class MemoryDumpManagerDelegate;
friend class MemoryDumpManagerTest;
+ FRIEND_TEST_ALL_PREFIXES(MemoryDumpManagerTest, DisableFailingDumpers);
+
+ static const int kMaxConsecutiveFailuresCount;
static void SetInstanceForTesting(MemoryDumpManager* instance);
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698