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

Side by Side Diff: base/trace_event/memory_dump_manager.h

Issue 1272703003: Revert of [tracing] Throttle rate of heavy dumps and support to request light/heavy dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@light_dumps
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // |mdp| will be issues on the given thread. Otherwise, the |mdp| should be 53 // |mdp| will be issues on the given thread. Otherwise, the |mdp| should be
54 // able to handle calls on arbitrary threads. 54 // able to handle calls on arbitrary threads.
55 void RegisterDumpProvider( 55 void RegisterDumpProvider(
56 MemoryDumpProvider* mdp, 56 MemoryDumpProvider* mdp,
57 const scoped_refptr<SingleThreadTaskRunner>& task_runner); 57 const scoped_refptr<SingleThreadTaskRunner>& task_runner);
58 void RegisterDumpProvider(MemoryDumpProvider* mdp); 58 void RegisterDumpProvider(MemoryDumpProvider* mdp);
59 void UnregisterDumpProvider(MemoryDumpProvider* mdp); 59 void UnregisterDumpProvider(MemoryDumpProvider* mdp);
60 60
61 // Requests a memory dump. The dump might happen or not depending on the 61 // Requests a memory dump. The dump might happen or not depending on the
62 // filters and categories specified when enabling tracing. 62 // filters and categories specified when enabling tracing.
63 // The |dump_args| is used to specify the dump's level of detail.
64 // The optional |callback| is executed asynchronously, on an arbitrary thread, 63 // The optional |callback| is executed asynchronously, on an arbitrary thread,
65 // to notify about the completion of the global dump (i.e. after all the 64 // to notify about the completion of the global dump (i.e. after all the
66 // processes have dumped) and its success (true iff all the dumps were 65 // processes have dumped) and its success (true iff all the dumps were
67 // successful). 66 // successful).
68 void RequestGlobalDump(MemoryDumpType dump_type, 67 void RequestGlobalDump(MemoryDumpType dump_type,
69 const MemoryDumpArgs& dump_args,
70 const MemoryDumpCallback& callback); 68 const MemoryDumpCallback& callback);
71 69
72 // Same as above (still asynchronous), but without callback. 70 // Same as above (still asynchronous), but without callback.
73 void RequestGlobalDump(MemoryDumpType dump_type, 71 void RequestGlobalDump(MemoryDumpType dump_type);
74 const MemoryDumpArgs& dump_args);
75 72
76 // TraceLog::EnabledStateObserver implementation. 73 // TraceLog::EnabledStateObserver implementation.
77 void OnTraceLogEnabled() override; 74 void OnTraceLogEnabled() override;
78 void OnTraceLogDisabled() override; 75 void OnTraceLogDisabled() override;
79 76
80 // Returns the MemoryDumpSessionState object, which is shared by all the 77 // Returns the MemoryDumpSessionState object, which is shared by all the
81 // ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing 78 // ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing
82 // session lifetime. 79 // session lifetime.
83 const scoped_refptr<MemoryDumpSessionState>& session_state() const { 80 const scoped_refptr<MemoryDumpSessionState>& session_state() const {
84 return session_state_; 81 return session_state_;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 244 }
248 245
249 private: 246 private:
250 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); 247 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate);
251 }; 248 };
252 249
253 } // namespace trace_event 250 } // namespace trace_event
254 } // namespace base 251 } // namespace base
255 252
256 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 253 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
OLDNEW
« 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