RFR: 8336421: ciMethod() constructor should use ConditionalMutexLocker(Compile_lock)
Tobias Hartmann
thartmann at openjdk.org
Tue Jul 16 08:54:54 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.
Marked as reviewed by thartmann (Reviewer).
Looks good to me. Any idea why we only hit this with Leyden and never seen it in mainline?
-------------
PR Review: https://git.openjdk.org/jdk/pull/20187#pullrequestreview-2179624060
PR Comment: https://git.openjdk.org/jdk/pull/20187#issuecomment-2230364376
More information about the hotspot-compiler-dev
mailing list