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

Unified Diff: base/trace_event/trace_config.h

Issue 1911643002: Add configurable limit to allocations in heap profiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitespace change Created 4 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/trace_event/memory_dump_session_state.cc ('k') | base/trace_event/trace_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5b119eae98c0d71a97016ab44d0e06d915d67c84 100644
--- a/base/trace_event/trace_config.h
+++ b/base/trace_event/trace_config.h
@@ -40,14 +40,38 @@ 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 Trigger {
+ uint32_t periodic_interval_ms;
+ MemoryDumpLevelOfDetail level_of_detail;
+ };
+
+ // Specifies the configuration options for the heap profiler.
+ struct HeapProfiler {
+ // Default value for |breakdown_threshold_bytes|.
+ enum { kDefaultBreakdownThresholdBytes = 1024 };
+
+ HeapProfiler();
- typedef std::vector<MemoryDumpTriggerConfig> MemoryDumpConfig;
+ // Reset the options to default.
+ void Clear();
+
+ uint32_t breakdown_threshold_bytes;
+ };
+
+ // Reset the values in the config.
+ void Clear();
+
+ std::vector<Trigger> triggers;
+ HeapProfiler heap_profiler_options;
+ };
TraceConfig();
« no previous file with comments | « base/trace_event/memory_dump_session_state.cc ('k') | base/trace_event/trace_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698