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

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: Fix cast style Created 4 years, 8 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
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..e18749d35b7dd454f17d940fc6c6ad8cd7ddc0eb 100644
--- a/base/trace_event/trace_config.h
+++ b/base/trace_event/trace_config.h
@@ -147,6 +147,9 @@ class BASE_EXPORT TraceConfig {
bool IsSamplingEnabled() const { return enable_sampling_; }
bool IsSystraceEnabled() const { return enable_systrace_; }
bool IsArgumentFilterEnabled() const { return enable_argument_filter_; }
+ size_t GetMinAllocationSizeBytes() const {
+ return min_allocation_size_bytes_;
+ }
void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; }
void EnableSampling() { enable_sampling_ = true; }
@@ -189,6 +192,9 @@ class BASE_EXPORT TraceConfig {
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, LegacyStringToMemoryDumpConfig);
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, EmptyMemoryDumpConfigTest);
+ // Default value for |min_allocation_size_bytes_|.
+ static const int kDefaultMinAllocationSizeBytes = 1024;
ssid 2016/04/20 23:06:51 1024 might be a very low value. It could make the
+
// The default trace config, used when none is provided.
// Allows all non-disabled-by-default categories through, except if they end
// in the suffix 'Debug' or 'Test'.
@@ -239,6 +245,7 @@ class BASE_EXPORT TraceConfig {
bool enable_argument_filter_ : 1;
MemoryDumpConfig memory_dump_config_;
+ size_t min_allocation_size_bytes_;
StringList included_categories_;
StringList disabled_categories_;

Powered by Google App Engine
This is Rietveld 408576698