Chromium Code Reviews| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 // processes have dumped) and its success (true iff all the dumps were | 119 // processes have dumped) and its success (true iff all the dumps were |
| 120 // successful). | 120 // successful). |
| 121 void RequestGlobalDump(MemoryDumpType dump_type, | 121 void RequestGlobalDump(MemoryDumpType dump_type, |
| 122 MemoryDumpLevelOfDetail level_of_detail, | 122 MemoryDumpLevelOfDetail level_of_detail, |
| 123 const GlobalMemoryDumpCallback& callback); | 123 const GlobalMemoryDumpCallback& callback); |
| 124 | 124 |
| 125 // Same as above (still asynchronous), but without callback. | 125 // Same as above (still asynchronous), but without callback. |
| 126 void RequestGlobalDump(MemoryDumpType dump_type, | 126 void RequestGlobalDump(MemoryDumpType dump_type, |
| 127 MemoryDumpLevelOfDetail level_of_detail); | 127 MemoryDumpLevelOfDetail level_of_detail); |
| 128 | 128 |
| 129 // Prepare MemoryDumpManager for RequestGlobalMemoryDump calls. | 129 // Prepare MemoryDumpManager for RequestGlobalMemoryDump calls for tracing |
| 130 // Starts the MemoryDumpManager thread. | 130 // related modes (non-SUMMARY_ONLY). |
| 131 // Also uses the given config to initialize the peak detector, | 131 // Initializes the peak detector, scheduler and heap profiler with the given |
| 132 // scheduler and heap profiler. | 132 // config. |
| 133 void Enable(const TraceConfig::MemoryDumpConfig&); | 133 void SetupForTracing(const TraceConfig::MemoryDumpConfig&); |
| 134 | 134 |
| 135 // Tearsdown the MemoryDumpManager thread and various other state set up by | 135 // Tear-down tracing related state. |
|
Primiano Tucci (use gerrit)
2017/05/09 12:34:11
maybe just clarify in the comment that the all the
| |
| 136 // Enable. | 136 void TeardownForTracing(); |
| 137 void Disable(); | |
| 138 | 137 |
| 139 // NOTE: Use RequestGlobalDump() to create memory dumps. Creates a memory dump | 138 // NOTE: Use RequestGlobalDump() to create memory dumps. Creates a memory dump |
| 140 // for the current process and appends it to the trace. |callback| will be | 139 // for the current process and appends it to the trace. |callback| will be |
| 141 // invoked asynchronously upon completion on the same thread on which | 140 // invoked asynchronously upon completion on the same thread on which |
| 142 // CreateProcessDump() was called. This method should only be used by the | 141 // CreateProcessDump() was called. This method should only be used by the |
| 143 // embedder while creating a global memory dump. | 142 // embedder while creating a global memory dump. |
| 144 void CreateProcessDump(const MemoryDumpRequestArgs& args, | 143 void CreateProcessDump(const MemoryDumpRequestArgs& args, |
| 145 const ProcessMemoryDumpCallback& callback); | 144 const ProcessMemoryDumpCallback& callback); |
| 146 | 145 |
| 147 // Enable heap profiling if kEnableHeapProfiling is specified. | 146 // Enable heap profiling if kEnableHeapProfiling is specified. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 // Whether new memory dump providers should be told to enable heap profiling. | 323 // Whether new memory dump providers should be told to enable heap profiling. |
| 325 bool heap_profiling_enabled_; | 324 bool heap_profiling_enabled_; |
| 326 | 325 |
| 327 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManager); | 326 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManager); |
| 328 }; | 327 }; |
| 329 | 328 |
| 330 } // namespace trace_event | 329 } // namespace trace_event |
| 331 } // namespace base | 330 } // namespace base |
| 332 | 331 |
| 333 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 332 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
| OLD | NEW |