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

Unified Diff: base/trace_event/memory_dump_manager.h

Issue 2799023002: memory-infra: Switch to MemoryPeakDetector and simplify MemoryDumpScheduler (Closed)
Patch Set: rebase bind -> bindonce Created 3 years, 8 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 e7f51948506f2458232fd62b1840b50062ce8ba4..4e5f8a2f77d00afae4d3cffc59678a19421071e5 100644
--- a/base/trace_event/memory_dump_manager.h
+++ b/base/trace_event/memory_dump_manager.h
@@ -42,7 +42,6 @@ namespace trace_event {
class MemoryDumpManagerDelegate;
class MemoryDumpProvider;
class MemoryDumpSessionState;
-class MemoryDumpScheduler;
// This is the interface exposed to the rest of the codebase to deal with
// memory tracing. The main entry point for clients is represented by
@@ -168,7 +167,6 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
friend struct DefaultSingletonTraits<MemoryDumpManager>;
friend class MemoryDumpManagerDelegate;
friend class MemoryDumpManagerTest;
- friend class MemoryDumpScheduler;
friend class memory_instrumentation::MemoryDumpManagerDelegateImplTest;
// Holds the state of a process memory dump that needs to be carried over
@@ -257,14 +255,6 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
// runner.
void InvokeOnMemoryDump(ProcessMemoryDumpAsyncState* owned_pmd_async_state);
- // Records a quick total memory usage in |memory_total|. This is used to track
- // and detect peaks in the memory usage of the process without having to
- // record all data from dump providers. This value is approximate to trade-off
- // speed, and not consistent with the rest of the memory-infra metrics. Must
- // be called on the dump thread.
- // Returns true if |memory_total| was updated by polling at least 1 MDP.
- bool PollFastMemoryTotal(uint64_t* memory_total);
-
// Helper for RegierDumpProvider* functions.
void RegisterDumpProviderInternal(
MemoryDumpProvider* mdp,
@@ -276,21 +266,15 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
void UnregisterDumpProviderInternal(MemoryDumpProvider* mdp,
bool take_mdp_ownership_and_delete_async);
- // Adds / removes provider that supports polling to
- // |dump_providers_for_polling_|.
- void RegisterPollingMDPOnDumpThread(
- scoped_refptr<MemoryDumpProviderInfo> mdpinfo);
- void UnregisterPollingMDPOnDumpThread(
- scoped_refptr<MemoryDumpProviderInfo> mdpinfo);
+ // Fills the passed vector with the subset of dump providers which were
+ // registered with is_fast_polling_supported == true.
+ void GetDumpProvidersForPolling(
+ std::vector<scoped_refptr<MemoryDumpProviderInfo>>*);
// An ordererd set of registered MemoryDumpProviderInfo(s), sorted by task
// runner affinity (MDPs belonging to the same task runners are adjacent).
MemoryDumpProviderInfo::OrderedSet dump_providers_;
- // A copy of mdpinfo list that support polling. It must be accessed only on
- // the dump thread if dump thread exists.
- MemoryDumpProviderInfo::OrderedSet dump_providers_for_polling_;
-
// Shared among all the PMDs to keep state scoped to the tracing session.
scoped_refptr<MemoryDumpSessionState> session_state_;
« 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