RFR: 8357473: Compilation spike leaves many CompileTasks in free list [v5]

Christian Hagedorn chagedorn at openjdk.org
Tue Jul 8 07:29:41 UTC 2025


On Fri, 4 Jul 2025 09:08:19 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> See bug for more discussion.
>> 
>> This PR implements the "all the way" solution by removing the free list completely. It complements https://github.com/openjdk/jdk/pull/25364, and can go either first, or second. We will remerge the other one once either integrates.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 server fastdebug, `compiler`
>>  - [x] Linux AArch64 server fastdebug, `all`
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
> 
>  - Merge branch 'master' into JDK-8357473-compile-task-free-list
>  - Merge branch 'master' into JDK-8357473-compile-task-free-list
>  - Merge branch 'master' into JDK-8357473-compile-task-free-list
>  - Merge branch 'master' into JDK-8357473-compile-task-free-list
>  - Also free the lock!
>  - Comments and indenting
>  - Basic deletion

Nice catch! Small nit, otherwise, looks good to me, too.

src/hotspot/share/compiler/compileTask.cpp line 84:

> 82: 
> 83: CompileTask::~CompileTask() {
> 84:   if ((_method_holder != nullptr && JNIHandles::is_weak_global_handle(_method_holder))) {

While moving the code, you can probably remove one pair of parentheses here:
Suggestion:

  if (_method_holder != nullptr && JNIHandles::is_weak_global_handle(_method_holder)) {

-------------

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25409#pullrequestreview-2996298093
PR Review Comment: https://git.openjdk.org/jdk/pull/25409#discussion_r2191683566


More information about the hotspot-compiler-dev mailing list