From 678691f70aab81905a96734b51dab99c0439635a Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Wed, 8 May 2024 17:01:36 -0700 Subject: Conditionally increase suspend timeout This does two things: 1. Respect ro.hw_timeout_multiplier when computing the default suspend timeout. 2. Increase the timeout by a factor of 2 when the thread initiating the suspension has low priority (positive nice value or Java priority < 5). Case 2 should not normally apply for threads with a 5 second ANR timeout. For suspension initiated from low priority threads, this should get us back to close to the original 10 second timeout. It should also give slow device the option of avoiding suspension timeouts by setting ro.hw_timeout_multiplier. Also includes some minor macro cleanups. Test: Treehugger Test: Some manual checking of suspend timeout values Bug: 339660702 Bug: 337585993 Bug: 327315839 Bug: 199683153 Bug: 297125507 (and others) Change-Id: I18638667a8d46d117b06ecedca13df9a6a7f8530 Change-Id: I12d2d7c047194775e1789b02603d3c1d96cc3191 --- compiler/driver/compiler_options_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/driver') diff --git a/compiler/driver/compiler_options_map.h b/compiler/driver/compiler_options_map.h index b2dd57d00e..136af36096 100644 --- a/compiler/driver/compiler_options_map.h +++ b/compiler/driver/compiler_options_map.h @@ -42,7 +42,7 @@ struct CompilerOptionsMap : VariantMap { #include "compiler_options_map.def" }; -#undef DECLARE_KEY +#undef COMPILER_OPTIONS_KEY } // namespace art -- cgit v1.2.3-59-g8ed1b