Commit 36f6d05e authored by Etienne Bergeron's avatar Etienne Bergeron Committed by Commit Bot

Increase the frequency or reports for the control population

We are currently receiving about 300 reports a day.
This CL is moving the frequency by 10x.

R=erikchen

Bug: 867921
Change-Id: I237e73afa929a0b8358b489dee4fef37f552aeda
Reviewed-on: https://chromium-review.googlesource.com/1159166Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579931}
parent 658390bd
...@@ -25,8 +25,8 @@ namespace { ...@@ -25,8 +25,8 @@ namespace {
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
// Check memory usage every 5 minutes. // Check memory usage every 5 minutes.
const int kRepeatingCheckMemoryDelayInMinutes = 5; const int kRepeatingCheckMemoryDelayInMinutes = 5;
// Every 5 min, rate of 1/3000 for shipping a control memlog report. // Every 5 min, rate of 1/300 for shipping a control memlog report.
const int kControlPopulationSamplingRate = 3000; const int kControlPopulationSamplingRate = 300;
const size_t kBrowserProcessMallocTriggerKb = 100 * 1024; // 100 MB const size_t kBrowserProcessMallocTriggerKb = 100 * 1024; // 100 MB
const size_t kGPUProcessMallocTriggerKb = 40 * 1024; // 40 MB const size_t kGPUProcessMallocTriggerKb = 40 * 1024; // 40 MB
...@@ -37,8 +37,8 @@ const uint32_t kHighWaterMarkThresholdKb = 50 * 1024; // 50 MB ...@@ -37,8 +37,8 @@ const uint32_t kHighWaterMarkThresholdKb = 50 * 1024; // 50 MB
#else #else
// Check memory usage every 15 minutes. // Check memory usage every 15 minutes.
const int kRepeatingCheckMemoryDelayInMinutes = 15; const int kRepeatingCheckMemoryDelayInMinutes = 15;
// Every 15 min, rate of 1/1000 for shipping a control memlog report. // Every 15 min, rate of 1/100 for shipping a control memlog report.
const int kControlPopulationSamplingRate = 1000; const int kControlPopulationSamplingRate = 100;
const size_t kBrowserProcessMallocTriggerKb = 400 * 1024; // 400 MB const size_t kBrowserProcessMallocTriggerKb = 400 * 1024; // 400 MB
const size_t kGPUProcessMallocTriggerKb = 400 * 1024; // 400 MB const size_t kGPUProcessMallocTriggerKb = 400 * 1024; // 400 MB
...@@ -168,7 +168,6 @@ void BackgroundProfilingTriggers::OnReceivedMemoryDump( ...@@ -168,7 +168,6 @@ void BackgroundProfilingTriggers::OnReceivedMemoryDump(
// Detect whether memory footprint is too high and send a memlog report. // Detect whether memory footprint is too high and send a memlog report.
bool should_send_report = false; bool should_send_report = false;
std::string trigger_name;
for (const auto& proc : dump->process_dumps()) { for (const auto& proc : dump->process_dumps()) {
if (!base::ContainsValue(profiled_pids, proc.pid())) if (!base::ContainsValue(profiled_pids, proc.pid()))
continue; continue;
...@@ -177,7 +176,6 @@ void BackgroundProfilingTriggers::OnReceivedMemoryDump( ...@@ -177,7 +176,6 @@ void BackgroundProfilingTriggers::OnReceivedMemoryDump(
auto it = pmf_at_last_upload_.find(proc.pid()); auto it = pmf_at_last_upload_.find(proc.pid());
if (it != pmf_at_last_upload_.end()) { if (it != pmf_at_last_upload_.end()) {
if (private_footprint_kb > it->second + kHighWaterMarkThresholdKb) { if (private_footprint_kb > it->second + kHighWaterMarkThresholdKb) {
trigger_name = "MEMLOG_BACKGROUND_TRIGGER";
should_send_report = true; should_send_report = true;
it->second = private_footprint_kb; it->second = private_footprint_kb;
} }
...@@ -187,7 +185,6 @@ void BackgroundProfilingTriggers::OnReceivedMemoryDump( ...@@ -187,7 +185,6 @@ void BackgroundProfilingTriggers::OnReceivedMemoryDump(
// No high water mark exists yet, check the trigger threshold. // No high water mark exists yet, check the trigger threshold.
if (IsOverTriggerThreshold(GetContentProcessType(proc.process_type()), if (IsOverTriggerThreshold(GetContentProcessType(proc.process_type()),
private_footprint_kb)) { private_footprint_kb)) {
trigger_name = "MEMLOG_BACKGROUND_TRIGGER";
should_send_report = true; should_send_report = true;
pmf_at_last_upload_[proc.pid()] = private_footprint_kb; pmf_at_last_upload_[proc.pid()] = private_footprint_kb;
} }
...@@ -204,7 +201,7 @@ void BackgroundProfilingTriggers::OnReceivedMemoryDump( ...@@ -204,7 +201,7 @@ void BackgroundProfilingTriggers::OnReceivedMemoryDump(
} }
} }
TriggerMemoryReport(std::move(trigger_name)); TriggerMemoryReport("MEMLOG_BACKGROUND_TRIGGER");
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment