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

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

Issue 1406213005: [tracing] Add names to memory-infra dumpers for debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@memory-infra-runtime
Patch Set: Rebase + fix android Created 5 years, 1 month 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // C string. 64 // C string.
65 // - task_runner: (optional) if non-null, all the calls to |mdp| will be 65 // - task_runner: (optional) if non-null, all the calls to |mdp| will be
66 // issued on the given thread. Otherwise, |mdp| should be able to 66 // issued on the given thread. Otherwise, |mdp| should be able to
67 // handle calls on arbitrary threads. 67 // handle calls on arbitrary threads.
68 void RegisterDumpProvider( 68 void RegisterDumpProvider(
69 MemoryDumpProvider* mdp, 69 MemoryDumpProvider* mdp,
70 const char* name, 70 const char* name,
71 const scoped_refptr<SingleThreadTaskRunner>& task_runner); 71 const scoped_refptr<SingleThreadTaskRunner>& task_runner);
72 void UnregisterDumpProvider(MemoryDumpProvider* mdp); 72 void UnregisterDumpProvider(MemoryDumpProvider* mdp);
73 73
74 // TODO(primiano): Remove these two after all the existing dump provider have
75 // been converted.
76 void RegisterDumpProvider(
77 MemoryDumpProvider* mdp,
78 const scoped_refptr<SingleThreadTaskRunner>& task_runner);
79 void RegisterDumpProvider(MemoryDumpProvider* mdp);
80
81 // Requests a memory dump. The dump might happen or not depending on the 74 // Requests a memory dump. The dump might happen or not depending on the
82 // filters and categories specified when enabling tracing. 75 // filters and categories specified when enabling tracing.
83 // The optional |callback| is executed asynchronously, on an arbitrary thread, 76 // The optional |callback| is executed asynchronously, on an arbitrary thread,
84 // to notify about the completion of the global dump (i.e. after all the 77 // to notify about the completion of the global dump (i.e. after all the
85 // processes have dumped) and its success (true iff all the dumps were 78 // processes have dumped) and its success (true iff all the dumps were
86 // successful). 79 // successful).
87 void RequestGlobalDump(MemoryDumpType dump_type, 80 void RequestGlobalDump(MemoryDumpType dump_type,
88 MemoryDumpLevelOfDetail level_of_detail, 81 MemoryDumpLevelOfDetail level_of_detail,
89 const MemoryDumpCallback& callback); 82 const MemoryDumpCallback& callback);
90 83
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 267 }
275 268
276 private: 269 private:
277 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); 270 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate);
278 }; 271 };
279 272
280 } // namespace trace_event 273 } // namespace trace_event
281 } // namespace base 274 } // namespace base
282 275
283 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 276 #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