RFR: 8308094: Add a compilation timeout flag to catch long running compilations [v5]
Manuel Hässig
mhaessig at openjdk.org
Thu Aug 14 12:01:08 UTC 2025
On Wed, 13 Aug 2025 08:31:11 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Manuel Hässig has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>>
>> - Merge branch 'master' into JDK-8308094-timeout
>> - Rename _timer
>> - remove _timeout_armed
>> - ASSERT
>> - Merge branch 'master' into JDK-8308094-timeout
>> - No acquire release semantics
>> - Factor Linux specific timeout functionality out of share/
>> - Move timeout disarm above if
>> - Merge branch 'master' into JDK-8308094-timeout
>> - Fix SIGALRM test
>> - ... and 1 more: https://git.openjdk.org/jdk/compare/098f25d4...8bb5eb7a
>
> src/hotspot/os/linux/compilerThreadTimeout_linux.hpp line 46:
>
>> 44: #endif // !PRODUCT
>> 45: public:
>> 46: CompilerThreadTimeoutLinux() NOT_PRODUCT(DEBUG_ONLY(: _timer(nullptr))) {};
>
> Why do you need the `NOT_PRODUCT`? It only wraps `DEBUG_ONLY`. If that's not set, the `NOT_PRODUCT` wraps nothing.
The initialization list should only be generated if `!PRODUCT && ASSERT`, so it does not appear in `optimized`. This is one way of expressing this conjunction in macros.
> src/hotspot/share/compiler/compilerThread.hpp line 54:
>
>> 52: void disarm() { return; };
>> 53: bool init_timeout() { return true; };
>> 54: };
>
> Should we also guard this with `ifndef LINUX` since it's only used for non-Linux?
Sounds reasonable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26023#discussion_r2276419674
PR Review Comment: https://git.openjdk.org/jdk/pull/26023#discussion_r2276420718
More information about the hotspot-dev
mailing list