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_REQUEST_ARGS_H_ | 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ |
| 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ | 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ |
| 7 | 7 |
| 8 // This file defines the types and structs used to issue memory dump requests. | 8 // This file defines the types and structs used to issue memory dump requests. |
| 9 // These are also used in the IPCs for coordinating inter-process memory dumps. | 9 // These are also used in the IPCs for coordinating inter-process memory dumps. |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 namespace trace_event { | 21 namespace trace_event { |
| 22 | 22 |
| 23 // Captures the reason why a memory dump is being requested. This is to allow | 23 // Captures the reason why a memory dump is being requested. This is to allow |
| 24 // selective enabling of dumps, filtering and post-processing. Keep this | 24 // selective enabling of dumps, filtering and post-processing. Keep this |
| 25 // consistent with memory_instrumentation.mojo and | 25 // consistent with memory_instrumentation.mojo and |
| 26 // memory_instrumentation_struct_traits.{h,cc} | 26 // memory_instrumentation_struct_traits.{h,cc} |
| 27 enum class MemoryDumpType { | 27 enum class MemoryDumpType { |
| 28 PERIODIC_INTERVAL, // Dumping memory at periodic intervals. | 28 PERIODIC_INTERVAL, // Dumping memory at periodic intervals. |
| 29 EXPLICITLY_TRIGGERED, // Non maskable dump request. | 29 EXPLICITLY_TRIGGERED, // Non maskable dump request. |
| 30 PEAK_MEMORY_USAGE, // Dumping memory at detected peak total memory usage. | 30 PEAK_MEMORY_USAGE, // Dumping memory at detected peak total memory usage. |
| 31 LAST = PEAK_MEMORY_USAGE // For IPC macros. | 31 SUMMARY_ONLY, // Calculate just the summary & don't add to the trace. |
| 32 LAST = SUMMARY_ONLY // For IPC macros. | |
|
ssid
2017/04/25 18:09:51
Nit: can you remove the comment that says IPC macr
hjd
2017/04/26 11:11:58
Done.
| |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 // Tells the MemoryDumpProvider(s) how much detailed their dumps should be. | 35 // Tells the MemoryDumpProvider(s) how much detailed their dumps should be. |
| 35 // Keep this consistent with memory_instrumentation.mojo and | 36 // Keep this consistent with memory_instrumentation.mojo and |
| 36 // memory_instrumentation_struct_traits.{h,cc} | 37 // memory_instrumentation_struct_traits.{h,cc} |
| 37 enum class MemoryDumpLevelOfDetail : uint32_t { | 38 enum class MemoryDumpLevelOfDetail : uint32_t { |
| 38 FIRST, | 39 FIRST, |
| 39 | 40 |
| 40 // For background tracing mode. The dump time is quick, and typically just the | 41 // For background tracing mode. The dump time is quick, and typically just the |
| 41 // totals are expected. Suballocations need not be specified. Dump name must | 42 // totals are expected. Suballocations need not be specified. Dump name must |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 BASE_EXPORT const char* MemoryDumpLevelOfDetailToString( | 119 BASE_EXPORT const char* MemoryDumpLevelOfDetailToString( |
| 119 const MemoryDumpLevelOfDetail& level_of_detail); | 120 const MemoryDumpLevelOfDetail& level_of_detail); |
| 120 | 121 |
| 121 BASE_EXPORT MemoryDumpLevelOfDetail | 122 BASE_EXPORT MemoryDumpLevelOfDetail |
| 122 StringToMemoryDumpLevelOfDetail(const std::string& str); | 123 StringToMemoryDumpLevelOfDetail(const std::string& str); |
| 123 | 124 |
| 124 } // namespace trace_event | 125 } // namespace trace_event |
| 125 } // namespace base | 126 } // namespace base |
| 126 | 127 |
| 127 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ | 128 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ |
| OLD | NEW |