Commit 9a698856 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Commit Bot

Report Memory.Experimental.Renderer.HighestPrivateMemoryFootprint.* metric on Win, Mac and Linux.

Change-Id: Ia240c27b892d29530fc10d7457f7dae40016ba97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2011624
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734382}
parent db997575
...@@ -56,8 +56,6 @@ jumbo_component("controller") { ...@@ -56,8 +56,6 @@ jumbo_component("controller") {
sources += [ sources += [
"crash_memory_metrics_reporter_impl.cc", "crash_memory_metrics_reporter_impl.cc",
"crash_memory_metrics_reporter_impl.h", "crash_memory_metrics_reporter_impl.h",
"highest_pmf_reporter.cc",
"highest_pmf_reporter.h",
"memory_usage_monitor_posix.cc", "memory_usage_monitor_posix.cc",
"memory_usage_monitor_posix.h", "memory_usage_monitor_posix.h",
"oom_intervention_impl.cc", "oom_intervention_impl.cc",
...@@ -82,6 +80,14 @@ jumbo_component("controller") { ...@@ -82,6 +80,14 @@ jumbo_component("controller") {
"Foundation.framework", "Foundation.framework",
] ]
} }
# HighestPmfReporter depends on MemoryUsageMonitor and MemoryUsageMonitor
# depends on platform specific code. Explicitly specify supported platforms.
if (is_linux || is_win || is_android || is_mac) {
sources += [
"highest_pmf_reporter.cc",
"highest_pmf_reporter.h",
]
}
configs -= [ "//build/config/compiler:default_symbols" ] configs -= [ "//build/config/compiler:default_symbols" ]
configs += blink_symbols_config configs += blink_symbols_config
...@@ -173,16 +179,15 @@ jumbo_source_set("blink_unittests_sources") { ...@@ -173,16 +179,15 @@ jumbo_source_set("blink_unittests_sources") {
} }
if (is_android) { if (is_android) {
sources += [ sources += [
"highest_pmf_reporter_test.cc",
"memory_usage_monitor_posix_test.cc", "memory_usage_monitor_posix_test.cc",
"memory_usage_monitor_test.cc",
"oom_intervention_impl_test.cc", "oom_intervention_impl_test.cc",
"user_level_memory_pressure_signal_generator_test.cc", "user_level_memory_pressure_signal_generator_test.cc",
] ]
} }
if (is_mac) { if (is_linux || is_android || is_mac || is_win) {
sources += [ sources += [
"highest_pmf_reporter_test.cc",
"memory_usage_monitor_test.cc", "memory_usage_monitor_test.cc",
] ]
} }
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include "third_party/blink/renderer/controller/crash_memory_metrics_reporter_impl.h" #include "third_party/blink/renderer/controller/crash_memory_metrics_reporter_impl.h"
#include "third_party/blink/renderer/controller/highest_pmf_reporter.h"
#include "third_party/blink/renderer/controller/oom_intervention_impl.h" #include "third_party/blink/renderer/controller/oom_intervention_impl.h"
#include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h" #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h"
#endif #endif
...@@ -71,6 +70,11 @@ ...@@ -71,6 +70,11 @@
#include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h" #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h"
#endif #endif
#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) || \
defined(OS_WIN)
#include "third_party/blink/renderer/controller/highest_pmf_reporter.h"
#endif
namespace blink { namespace blink {
namespace { namespace {
...@@ -143,7 +147,10 @@ void InitializeCommon(Platform* platform, mojo::BinderMap* binders) { ...@@ -143,7 +147,10 @@ void InitializeCommon(Platform* platform, mojo::BinderMap* binders) {
// Initialize CrashMemoryMetricsReporterImpl in order to assure that memory // Initialize CrashMemoryMetricsReporterImpl in order to assure that memory
// allocation does not happen in OnOOMCallback. // allocation does not happen in OnOOMCallback.
CrashMemoryMetricsReporterImpl::Instance(); CrashMemoryMetricsReporterImpl::Instance();
#endif
#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) || \
defined(OS_WIN)
// Start reporting the highest private memory footprint after the first // Start reporting the highest private memory footprint after the first
// navigation. // navigation.
HighestPmfReporter::Instance(); HighestPmfReporter::Instance();
......
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