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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 1335503003: [tracing] Add test for memory-infra startup tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup_tracing
Patch Set: Nit Created 5 years, 3 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_manager.h ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('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 7fb882557615a1d7214dd8cfba60bc76b5c08d3b..4ead9e9f34641e22b60ac1e9ca4f40de1421440f 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -56,7 +56,7 @@ void RequestPeriodicGlobalDump() {
? MemoryDumpArgs::LevelOfDetail::HIGH
: MemoryDumpArgs::LevelOfDetail::LOW;
- if (++g_periodic_dumps_count == g_heavy_dumps_rate - 1)
+ if (++g_periodic_dumps_count == g_heavy_dumps_rate)
g_periodic_dumps_count = 0;
}
@@ -109,8 +109,7 @@ MemoryDumpManager::MemoryDumpManager()
is_coordinator_(false),
memory_tracing_enabled_(0),
tracing_process_id_(kInvalidTracingProcessId),
- skip_core_dumpers_auto_registration_for_testing_(false),
- disable_periodic_dumps_for_testing_(false) {
+ skip_core_dumpers_auto_registration_for_testing_(false) {
g_next_guid.GetNext(); // Make sure that first guid is not zero.
}
@@ -426,11 +425,9 @@ void MemoryDumpManager::OnTraceLogEnabled() {
// TODO(primiano): This is a temporary hack to disable periodic memory dumps
// when running memory benchmarks until telemetry uses TraceConfig to
// enable/disable periodic dumps. See crbug.com/529184 .
- // The same mechanism should be used to disable periodic dumps in tests.
if (!is_coordinator_ ||
CommandLine::ForCurrentProcess()->HasSwitch(
- "enable-memory-benchmarking") ||
- disable_periodic_dumps_for_testing_) {
+ "enable-memory-benchmarking")) {
return;
}
« no previous file with comments | « base/trace_event/memory_dump_manager.h ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698