Commit 6952587b authored by Mike Wittman's avatar Mike Wittman Committed by Commit Bot

Revert "[Sampling profiler] Enable on ARM32 Android canary for render thread"

This reverts commit 44f6ea57.

Reason for revert: crashes in stack_unwinder::Module::Load()

Original change's description:
> [Sampling profiler] Enable on ARM32 Android canary for render thread
>
> Enables the ThreadProfiler on Android canary channel Chrome releases
> for ARM32. The profiler is enabled solely on the renderer main thread
> for now, pending stability and performance metrics from the wild.
>
> Bug: 1004855
> Change-Id: If393653adf362f3fccbfa93078f45d88284fc81b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2433125
> Commit-Queue: Mike Wittman <wittman@chromium.org>
> Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#813548}

TBR=wittman@chromium.org,etiennep@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1135152, 1004855
Change-Id: I3e04e2b1f5174fb01e29bbf912f70517d1424af9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2448960Reviewed-by: default avatarMike Wittman <wittman@chromium.org>
Commit-Queue: Mike Wittman <wittman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813784}
parent 963c0d95
......@@ -192,13 +192,6 @@ double AndroidPlatformConfiguration::GetChildProcessEnableFraction(
if (browser_test_mode_enabled())
return DefaultPlatformConfiguration::GetChildProcessEnableFraction(process);
// Enable just on renderer process for now. Enabling for 40% of renderer
// processes samples roughly one renderer process on average for every Chrome
// execution, based on early channel data in the
// Memory.RenderProcessHost.Count.InitializedAndNotDead histogram.
if (process == metrics::CallStackProfileParams::RENDERER_PROCESS)
return 0.4;
// TODO(https://crbug.com/1004855): Enable for all the default processes.
return 0.0;
}
......@@ -206,23 +199,15 @@ double AndroidPlatformConfiguration::GetChildProcessEnableFraction(
bool AndroidPlatformConfiguration::IsEnabledForThread(
metrics::CallStackProfileParams::Process process,
metrics::CallStackProfileParams::Thread thread) const {
// Enable on renderer process main thread in production, for now.
if (process == metrics::CallStackProfileParams::RENDERER_PROCESS &&
thread == metrics::CallStackProfileParams::MAIN_THREAD) {
return true;
}
// Otherwise enable in dedicated ThreadProfiler browser tests.
// Disable for all supported threads pending launch. Enable only for browser
// tests.
return browser_test_mode_enabled();
}
bool AndroidPlatformConfiguration::IsSupportedForChannel(
base::Optional<version_info::Channel> release_channel) const {
// Enable on canary, for now.
if (release_channel && *release_channel == version_info::Channel::CANARY)
return true;
// Otherwise enable in dedicated ThreadProfiler browser tests.
// On Android profiling is only enabled in its own dedicated browser tests
// in local builds and the CQ.
// TODO(https://crbug.com/1004855): Enable across all browser tests.
return browser_test_mode_enabled();
}
......
......@@ -72,7 +72,7 @@ TEST_F(ThreadProfilerPlatformConfigurationTest, IsSupported) {
EXPECT_FALSE(config()->IsSupported(base::nullopt));
#elif defined(OS_ANDROID)
EXPECT_FALSE(config()->IsSupported(version_info::Channel::UNKNOWN));
EXPECT_TRUE(config()->IsSupported(version_info::Channel::CANARY));
EXPECT_FALSE(config()->IsSupported(version_info::Channel::CANARY));
EXPECT_FALSE(config()->IsSupported(version_info::Channel::DEV));
EXPECT_FALSE(config()->IsSupported(version_info::Channel::BETA));
EXPECT_FALSE(config()->IsSupported(version_info::Channel::STABLE));
......@@ -126,15 +126,14 @@ MAYBE_PLATFORM_CONFIG_TEST_F(ThreadProfilerPlatformConfigurationTest,
MAYBE_PLATFORM_CONFIG_TEST_F(ThreadProfilerPlatformConfigurationTest,
GetEnableRates) {
// Note: death tests aren't supported on Android. Otherwise this test would
// check that all inputs result in CHECKs.
#if !defined(OS_ANDROID)
using RelativePopulations =
ThreadProfilerPlatformConfiguration::RelativePopulations;
EXPECT_CHECK_DEATH(config()->GetEnableRates(version_info::Channel::UNKNOWN));
EXPECT_EQ((RelativePopulations{80, 20}),
config()->GetEnableRates(version_info::Channel::CANARY));
#if defined(OS_ANDROID)
// Note: death tests aren't supported on Android. Otherwise this test would
// check that the other inputs result in CHECKs.
#else
EXPECT_CHECK_DEATH(config()->GetEnableRates(version_info::Channel::UNKNOWN));
EXPECT_EQ((RelativePopulations{80, 20}),
config()->GetEnableRates(version_info::Channel::DEV));
EXPECT_CHECK_DEATH(config()->GetEnableRates(version_info::Channel::BETA));
......@@ -150,7 +149,7 @@ MAYBE_PLATFORM_CONFIG_TEST_F(ThreadProfilerPlatformConfigurationTest,
#if defined(OS_ANDROID)
EXPECT_EQ(0.0, config()->GetChildProcessEnableFraction(
metrics::CallStackProfileParams::GPU_PROCESS));
EXPECT_EQ(0.4, config()->GetChildProcessEnableFraction(
EXPECT_EQ(0.0, config()->GetChildProcessEnableFraction(
metrics::CallStackProfileParams::RENDERER_PROCESS));
EXPECT_EQ(0.0, config()->GetChildProcessEnableFraction(
metrics::CallStackProfileParams::NETWORK_SERVICE_PROCESS));
......@@ -192,7 +191,7 @@ MAYBE_PLATFORM_CONFIG_TEST_F(ThreadProfilerPlatformConfigurationTest,
metrics::CallStackProfileParams::GPU_PROCESS,
metrics::CallStackProfileParams::COMPOSITOR_THREAD));
EXPECT_TRUE(config()->IsEnabledForThread(
EXPECT_FALSE(config()->IsEnabledForThread(
metrics::CallStackProfileParams::RENDERER_PROCESS,
metrics::CallStackProfileParams::MAIN_THREAD));
EXPECT_FALSE(config()->IsEnabledForThread(
......
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