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

Unified Diff: base/trace_event/memory_dump_manager.h

Issue 2845633002: memory-infra: Remove is_enabled_ from MDM (Closed)
Patch Set: add not reached Created 3 years, 7 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 6c71a247a68aad73f143ca5b9af3cd336574192d..f3580b9722399ac578aed415480e825651e2bec5 100644
--- a/base/trace_event/memory_dump_manager.h
+++ b/base/trace_event/memory_dump_manager.h
@@ -114,6 +114,8 @@ class BASE_EXPORT MemoryDumpManager {
// Requests a memory dump. The dump might happen or not depending on the
// filters and categories specified when enabling tracing.
+ // A SUMMARY_ONLY dump can be requested at any time after initialization and
+ // other type of dumps can be requested only when MDM is enabled.
// The optional |callback| is executed asynchronously, on an arbitrary thread,
// to notify about the completion of the global dump (i.e. after all the
// processes have dumped) and its success (true iff all the dumps were
@@ -126,14 +128,13 @@ class BASE_EXPORT MemoryDumpManager {
void RequestGlobalDump(MemoryDumpType dump_type,
MemoryDumpLevelOfDetail level_of_detail);
- // Prepare MemoryDumpManager for RequestGlobalMemoryDump calls.
- // Starts the MemoryDumpManager thread.
- // Also uses the given config to initialize the peak detector,
- // scheduler and heap profiler.
+ // Prepare MemoryDumpManager for RequestGlobalMemoryDump calls for tracing
+ // related modes (non-SUMMARY_ONLY).
+ // Initializes the peak detector, scheduler and heap profiler with the given
+ // config.
void Enable(const TraceConfig::MemoryDumpConfig&);
- // Tearsdown the MemoryDumpManager thread and various other state set up by
- // Enable.
+ // Tear-down tracing related state.
void Disable();
// NOTE: Use RequestGlobalDump() to create memory dumps. Creates a memory dump
@@ -306,10 +307,6 @@ class BASE_EXPORT MemoryDumpManager {
// disabling logging while dumping on another thread.
Lock lock_;
- // Optimization to avoid attempting any memory dump (i.e. to not walk an empty
- // dump_providers_enabled_ list) when tracing is not enabled.
- subtle::AtomicWord is_enabled_;
-
// Thread used for MemoryDumpProviders which don't specify a task runner
// affinity.
std::unique_ptr<Thread> dump_thread_;
« 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