Integrated: 8336421: ciMethod() constructor should use ConditionalMutexLocker(Compile_lock)

Vladimir Kozlov kvn at openjdk.org
Tue Jul 16 16:13:57 UTC 2024


On Tue, 16 Jul 2024 01:01:17 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> During Leyden testing with `-XX:+LogCompilation` flag I hit assert because `ciMethod()` could be called from `ciEnv::register_method()` which already holds `Compile_lock` lock. See call stack in JBS report.
> Use `ConditionalMutexLocker` in `ciMethod()`.
> This is normal code pattern used in other places where we can have nested locking: [compileBroker.cpp#L2847](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compileBroker.cpp#L2847).
> 
> Tested tier1.

This pull request has now been integrated.

Changeset: 88eff4c3
Author:    Vladimir Kozlov <kvn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/88eff4c3054b7d9d6486ff418bbecca8f0388117
Stats:     2 lines in 1 file changed: 1 ins; 0 del; 1 mod

8336421: ciMethod() constructor should use ConditionalMutexLocker(Compile_lock)

Reviewed-by: jwaters, thartmann, shade

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

PR: https://git.openjdk.org/jdk/pull/20187


More information about the hotspot-compiler-dev mailing list