| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 125                          const GlobalMemoryDumpCallback& callback); | 125                          const GlobalMemoryDumpCallback& callback); | 
| 126 | 126 | 
| 127   // Same as above (still asynchronous), but without callback. | 127   // Same as above (still asynchronous), but without callback. | 
| 128   void RequestGlobalDump(MemoryDumpType dump_type, | 128   void RequestGlobalDump(MemoryDumpType dump_type, | 
| 129                          MemoryDumpLevelOfDetail level_of_detail); | 129                          MemoryDumpLevelOfDetail level_of_detail); | 
| 130 | 130 | 
| 131   // Prepare MemoryDumpManager for RequestGlobalMemoryDump calls for tracing | 131   // Prepare MemoryDumpManager for RequestGlobalMemoryDump calls for tracing | 
| 132   // related modes (non-SUMMARY_ONLY). | 132   // related modes (non-SUMMARY_ONLY). | 
| 133   // Initializes the peak detector, scheduler and heap profiler with the given | 133   // Initializes the peak detector, scheduler and heap profiler with the given | 
| 134   // config. | 134   // config. | 
| 135   void Enable(const TraceConfig::MemoryDumpConfig&); | 135   void SetupForTracing(const TraceConfig::MemoryDumpConfig&); | 
| 136 | 136 | 
| 137   // Tear-down tracing related state. | 137   // Tear-down tracing related state. | 
| 138   void Disable(); | 138   // Non-tracing modes (e.g. SUMMARY_ONLY) will continue to work. | 
|  | 139   void TeardownForTracing(); | 
| 139 | 140 | 
| 140   // NOTE: Use RequestGlobalDump() to create memory dumps. Creates a memory dump | 141   // NOTE: Use RequestGlobalDump() to create memory dumps. Creates a memory dump | 
| 141   // for the current process and appends it to the trace. |callback| will be | 142   // for the current process and appends it to the trace. |callback| will be | 
| 142   // invoked asynchronously upon completion on the same thread on which | 143   // invoked asynchronously upon completion on the same thread on which | 
| 143   // CreateProcessDump() was called. This method should only be used by the | 144   // CreateProcessDump() was called. This method should only be used by the | 
| 144   // embedder while creating a global memory dump. | 145   // embedder while creating a global memory dump. | 
| 145   void CreateProcessDump(const MemoryDumpRequestArgs& args, | 146   void CreateProcessDump(const MemoryDumpRequestArgs& args, | 
| 146                          const ProcessMemoryDumpCallback& callback); | 147                          const ProcessMemoryDumpCallback& callback); | 
| 147 | 148 | 
| 148   // Enable heap profiling if kEnableHeapProfiling is specified. | 149   // Enable heap profiling if kEnableHeapProfiling is specified. | 
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 321   // Whether new memory dump providers should be told to enable heap profiling. | 322   // Whether new memory dump providers should be told to enable heap profiling. | 
| 322   bool heap_profiling_enabled_; | 323   bool heap_profiling_enabled_; | 
| 323 | 324 | 
| 324   DISALLOW_COPY_AND_ASSIGN(MemoryDumpManager); | 325   DISALLOW_COPY_AND_ASSIGN(MemoryDumpManager); | 
| 325 }; | 326 }; | 
| 326 | 327 | 
| 327 }  // namespace trace_event | 328 }  // namespace trace_event | 
| 328 }  // namespace base | 329 }  // namespace base | 
| 329 | 330 | 
| 330 #endif  // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 331 #endif  // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 
| OLD | NEW | 
|---|