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

Unified Diff: base/trace_event/memory_dump_manager.h

Issue 987043003: [tracing] Introduce support for userland memory allocators dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mmaps_en
Patch Set: Rebase Created 5 years, 9 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
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 8a9b3b7e95a414dc72d3b17333199ff97d0bf21f..928de6f8e98c9c78354a07a5752674afc7e80d04 100644
--- a/base/trace_event/memory_dump_manager.h
+++ b/base/trace_event/memory_dump_manager.h
@@ -49,6 +49,12 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
void OnTraceLogEnabled() override;
void OnTraceLogDisabled() override;
+ // Returns the MemoryDumpProvider which is currently being dumping into a
+ // ProcessMemoryDump via DumpInto(...) if any, nullptr otherwise.
+ MemoryDumpProvider* dump_provider_currently_active() const {
+ return dump_provider_currently_active_;
+ }
+
private:
friend struct DefaultDeleter<MemoryDumpManager>; // For the testing instance.
friend struct DefaultSingletonTraits<MemoryDumpManager>;
@@ -69,6 +75,7 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
std::vector<MemoryDumpProvider*> dump_providers_registered_; // Not owned.
std::vector<MemoryDumpProvider*> dump_providers_enabled_; // Not owned.
+ MemoryDumpProvider* dump_provider_currently_active_; // Now owned.
// Protects from concurrent accesses to the |dump_providers_*|, e.g., tearing
// down logging while creating a dump point on another thread.

Powered by Google App Engine
This is Rietveld 408576698