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

Unified Diff: base/trace_event/memory_dump_manager.h

Issue 2861133002: memory-infra: Move dump level check to observer and rename session state (Closed)
Patch Set: rebase 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') | base/trace_event/memory_dump_manager.cc » ('J')
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 03192bfa91efd9521ee335755c46a61ec668d278..ad8b952c74c878ccf0c6005121601dc0c3b1696a 100644
--- a/base/trace_event/memory_dump_manager.h
+++ b/base/trace_event/memory_dump_manager.h
@@ -147,18 +147,15 @@ class BASE_EXPORT MemoryDumpManager {
// Enable heap profiling if kEnableHeapProfiling is specified.
void EnableHeapProfilingIfNeeded();
- // Returns true if the dump mode is allowed for current tracing session.
- bool IsDumpModeAllowed(MemoryDumpLevelOfDetail dump_mode);
-
// Lets tests see if a dump provider is registered.
bool IsDumpProviderRegisteredForTesting(MemoryDumpProvider*);
// Returns the MemoryDumpSessionState object, which is shared by all the
Primiano Tucci (use gerrit) 2017/05/05 13:38:24 I'd remove this comment and update the one below a
// ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing
// session lifetime.
- const scoped_refptr<MemoryDumpSessionState>& session_state_for_testing()
- const {
- return session_state_;
+ const scoped_refptr<MemoryDumpSessionState>&
+ heap_profiler_serialization_state_for_testing() const {
+ return heap_profiler_serialization_state_;
}
// Returns a unique id for identifying the processes. The id can be
@@ -197,7 +194,7 @@ class BASE_EXPORT MemoryDumpManager {
ProcessMemoryDumpAsyncState(
MemoryDumpRequestArgs req_args,
const MemoryDumpProviderInfo::OrderedSet& dump_providers,
- scoped_refptr<MemoryDumpSessionState> session_state,
+ scoped_refptr<MemoryDumpSessionState> heap_profiler_serialization_state,
ProcessMemoryDumpCallback callback,
scoped_refptr<SequencedTaskRunner> dump_thread_task_runner);
~ProcessMemoryDumpAsyncState();
@@ -222,7 +219,7 @@ class BASE_EXPORT MemoryDumpManager {
std::vector<scoped_refptr<MemoryDumpProviderInfo>> pending_dump_providers;
// The trace-global session state.
- scoped_refptr<MemoryDumpSessionState> session_state;
+ scoped_refptr<MemoryDumpSessionState> heap_profiler_serialization_state;
// Callback passed to the initial call to CreateProcessDump().
ProcessMemoryDumpCallback callback;
@@ -293,7 +290,7 @@ class BASE_EXPORT MemoryDumpManager {
MemoryDumpProviderInfo::OrderedSet dump_providers_;
// Shared among all the PMDs to keep state scoped to the tracing session.
- scoped_refptr<MemoryDumpSessionState> session_state_;
+ scoped_refptr<MemoryDumpSessionState> heap_profiler_serialization_state_;
std::unique_ptr<MemoryTracingObserver> tracing_observer_;
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | base/trace_event/memory_dump_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698