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

Unified Diff: base/trace_event/memory_dump_manager.cc

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/malloc_dump_provider.cc ('k') | base/trace_event/memory_dump_session_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_dump_manager.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index e18a20c4c1e5cef3ec8dbed7abae1306b259bff0..fba04fcc74cb6fe4b62322efa32d1c0ecae6a4f0 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -682,15 +682,16 @@ void MemoryDumpManager::OnTraceLogEnabled() {
g_periodic_dumps_count = 0;
const TraceConfig trace_config =
TraceLog::GetInstance()->GetCurrentTraceConfig();
- const TraceConfig::MemoryDumpConfig& config_list =
- trace_config.memory_dump_config();
- if (config_list.empty())
+ session_state_->SetMemoryDumpConfig(trace_config.memory_dump_config());
+ const std::vector<TraceConfig::MemoryDumpConfig::Trigger>& triggers_list =
+ trace_config.memory_dump_config().triggers;
+ if (triggers_list.empty())
return;
uint32_t min_timer_period_ms = std::numeric_limits<uint32_t>::max();
uint32_t heavy_dump_period_ms = 0;
- DCHECK_LE(config_list.size(), 2u);
- for (const TraceConfig::MemoryDumpTriggerConfig& config : config_list) {
+ DCHECK_LE(triggers_list.size(), 2u);
+ for (const TraceConfig::MemoryDumpConfig::Trigger& config : triggers_list) {
DCHECK(config.periodic_interval_ms);
if (config.level_of_detail == MemoryDumpLevelOfDetail::DETAILED)
heavy_dump_period_ms = config.periodic_interval_ms;
« no previous file with comments | « base/trace_event/malloc_dump_provider.cc ('k') | base/trace_event/memory_dump_session_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698