Chromium Code Reviews| Index: base/trace_event/trace_config.h |
| diff --git a/base/trace_event/trace_config.h b/base/trace_event/trace_config.h |
| index 72ca5f868785691b7686fef576f6eb59218c4592..fbebf0b6ad7c1987f899af5f5f309a9d080d172d 100644 |
| --- a/base/trace_event/trace_config.h |
| +++ b/base/trace_event/trace_config.h |
| @@ -40,14 +40,42 @@ class BASE_EXPORT TraceConfig { |
| public: |
| typedef std::vector<std::string> StringList; |
| - // Specifies the memory dump config for tracing. Used only when |
| - // "memory-infra" category is enabled. |
| - struct MemoryDumpTriggerConfig { |
| - uint32_t periodic_interval_ms; |
| - MemoryDumpLevelOfDetail level_of_detail; |
| + // Specifies the memory dump config for tracing. |
| + // Used only when "memory-infra" category is enabled. |
| + struct MemoryDumpConfig { |
| + MemoryDumpConfig(); |
| + MemoryDumpConfig(const MemoryDumpConfig& other); |
| + ~MemoryDumpConfig(); |
| + |
| + // Specifies the triggers in the memory dump config. |
| + struct MemoryDumpTriggerConfig { |
|
Primiano Tucci (use gerrit)
2016/04/28 07:33:45
I'd probably shorten these names (e.g. s/MemoryDum
Maria
2016/04/28 17:23:39
Done.
|
| + uint32_t periodic_interval_ms; |
| + MemoryDumpLevelOfDetail level_of_detail; |
| + }; |
| + |
| + // Specifies the configuration options for the heap profiler. |
| + struct HeapProfilerOptions { |
| + // Default value for |breakdown_threshold_bytes|. |
| + enum { kDefaultBreakdownThresholdBytes = 1024 }; |
| + |
| + HeapProfilerOptions(); |
| + ~HeapProfilerOptions(); |
|
Primiano Tucci (use gerrit)
2016/04/28 07:33:45
I think you can omit empty dtors for trivial struc
Maria
2016/04/28 17:23:39
Done.
|
| + |
| + // Reset the options to default. |
| + void Clear(); |
| + |
| + uint32_t breakdown_threshold_bytes; |
| + }; |
| + |
| + // Reset the values in the config. |
| + void Clear(); |
| + |
| + std::vector<MemoryDumpTriggerConfig> triggers; |
| + HeapProfilerOptions heap_profiler_options; |
| }; |
| - typedef std::vector<MemoryDumpTriggerConfig> MemoryDumpConfig; |
| + typedef MemoryDumpConfig::MemoryDumpTriggerConfig MemoryDumpTrigger; |
| + typedef MemoryDumpConfig::HeapProfilerOptions MemoryDumpHeapProfilerOptions; |
| TraceConfig(); |