OLD | NEW |
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 Loading... |
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. |
63 // The optional |callback| is executed asynchronously, on an arbitrary thread, | 64 // The optional |callback| is executed asynchronously, on an arbitrary thread, |
64 // to notify about the completion of the global dump (i.e. after all the | 65 // to notify about the completion of the global dump (i.e. after all the |
65 // processes have dumped) and its success (true iff all the dumps were | 66 // processes have dumped) and its success (true iff all the dumps were |
66 // successful). | 67 // successful). |
67 void RequestGlobalDump(MemoryDumpType dump_type, | 68 void RequestGlobalDump(MemoryDumpType dump_type, |
| 69 const MemoryDumpArgs& dump_args, |
68 const MemoryDumpCallback& callback); | 70 const MemoryDumpCallback& callback); |
69 | 71 |
70 // Same as above (still asynchronous), but without callback. | 72 // Same as above (still asynchronous), but without callback. |
71 void RequestGlobalDump(MemoryDumpType dump_type); | 73 void RequestGlobalDump(MemoryDumpType dump_type, |
| 74 const MemoryDumpArgs& dump_args); |
72 | 75 |
73 // TraceLog::EnabledStateObserver implementation. | 76 // TraceLog::EnabledStateObserver implementation. |
74 void OnTraceLogEnabled() override; | 77 void OnTraceLogEnabled() override; |
75 void OnTraceLogDisabled() override; | 78 void OnTraceLogDisabled() override; |
76 | 79 |
77 // Returns the MemoryDumpSessionState object, which is shared by all the | 80 // Returns the MemoryDumpSessionState object, which is shared by all the |
78 // ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing | 81 // ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing |
79 // session lifetime. | 82 // session lifetime. |
80 const scoped_refptr<MemoryDumpSessionState>& session_state() const { | 83 const scoped_refptr<MemoryDumpSessionState>& session_state() const { |
81 return session_state_; | 84 return session_state_; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 247 } |
245 | 248 |
246 private: | 249 private: |
247 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); | 250 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); |
248 }; | 251 }; |
249 | 252 |
250 } // namespace trace_event | 253 } // namespace trace_event |
251 } // namespace base | 254 } // namespace base |
252 | 255 |
253 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 256 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
OLD | NEW |