[perfcombined2024] Disable EnableHangWatcher on Android by default.
go/perf-combined-2024-summary Bug: 40287434 Change-Id: I3157dc730e265288f6d17f3cf742655bf709060e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092521 Commit-Queue: Francois Pierre Doray <fdoray@chromium.org> Reviewed-by: Olivier Li <olivierli@chromium.org> Auto-Submit: Francois Pierre Doray <fdoray@chromium.org> Cr-Commit-Position: refs/heads/main@{#1398810}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
2dda1d652c
commit
c04dada873
base/threading
testing/variations
@@ -178,11 +178,18 @@ bool ThreadTypeLoggingLevelGreaterOrEqual(HangWatcher::ThreadType thread_type,
|
||||
|
||||
} // namespace
|
||||
|
||||
// Determines if the HangWatcher is activated. When false the HangWatcher
|
||||
// thread never started.
|
||||
// Enables the HangWatcher. When disabled, the HangWatcher thread should not be
|
||||
// started. Enabled by default only on platforms where the generated data is
|
||||
// used, to avoid unnecessary overhead.
|
||||
BASE_FEATURE(kEnableHangWatcher,
|
||||
"EnableHangWatcher",
|
||||
FEATURE_ENABLED_BY_DEFAULT);
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || \
|
||||
BUILDFLAG(IS_LINUX)
|
||||
FEATURE_ENABLED_BY_DEFAULT
|
||||
#else
|
||||
FEATURE_DISABLED_BY_DEFAULT
|
||||
#endif
|
||||
);
|
||||
|
||||
// Browser process.
|
||||
constexpr base::FeatureParam<int> kIOThreadLogLevel{
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include "base/barrier_closure.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
@@ -951,6 +952,9 @@ TEST_F(HangWatcherPeriodicMonitoringTest, PeriodicCallsTakePlace) {
|
||||
// invoked enough times.
|
||||
hang_watcher_.SetAfterMonitorClosureForTesting(BarrierClosure(
|
||||
kMinimumMonitorCount, base::BindLambdaForTesting([&run_loop] {
|
||||
// This should only run if there are threads to watch.
|
||||
EXPECT_TRUE(base::FeatureList::IsEnabled(kEnableHangWatcher));
|
||||
|
||||
// Test condition are confirmed, stop monitoring.
|
||||
HangWatcher::StopMonitoringForTesting();
|
||||
|
||||
@@ -969,7 +973,10 @@ TEST_F(HangWatcherPeriodicMonitoringTest, PeriodicCallsTakePlace) {
|
||||
unregister_thread_closure_ =
|
||||
HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread);
|
||||
|
||||
run_loop.Run();
|
||||
// The "after monitor" closure only runs if there are threads to watch.
|
||||
if (base::FeatureList::IsEnabled(kEnableHangWatcher)) {
|
||||
run_loop.Run();
|
||||
}
|
||||
|
||||
// No monitored scope means no possible hangs.
|
||||
ASSERT_FALSE(hang_event_.IsSignaled());
|
||||
|
@@ -16659,9 +16659,6 @@
|
||||
"MojoBindingsInlineSLS",
|
||||
"ReduceCpuUtilization2",
|
||||
"SharedStorageAPIEnableWALForDatabase"
|
||||
],
|
||||
"disable_features": [
|
||||
"EnableHangWatcher"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user