RFR: 8362530: VM crash with -XX:+PrintTieredEvents when collecting AOT profiling
Christian Hagedorn
chagedorn at openjdk.org
Wed Aug 13 08:59:11 UTC 2025
On Tue, 12 Aug 2025 18:02:16 GMT, Igor Veresov <iveresov at openjdk.org> wrote:
> When printing tiered events we take the ttyLock and also now the trainingDataLock. While benign it's best to decouple these. The solution is to gather the output bits in a buffer and then print it.
Do you also have a regression test for the crash that you could add or add the print flag to some existing test to verify your change?
I have two more small comments but otherwise, it looks good to me, too!
src/hotspot/share/compiler/compilationPolicy.cpp line 407:
> 405: }
> 406:
> 407: void CompilationPolicy::print_counters_on(outputStream* st, const char* prefix, Method* m) {
Suggestion:
void CompilationPolicy::print_counters_on(outputStream* st, const char* prefix, Method* m) {
src/hotspot/share/compiler/compilationPolicy.cpp line 552:
> 550: print_event_on(&s, type, m, im, bci, level);
> 551: ResourceMark rm;
> 552: ttyLocker tty_lock;
Do you really need the lock with only one `print()`? I thought it should be safe in that case.
-------------
PR Review: https://git.openjdk.org/jdk/pull/26750#pullrequestreview-3114605784
PR Review Comment: https://git.openjdk.org/jdk/pull/26750#discussion_r2272563957
PR Review Comment: https://git.openjdk.org/jdk/pull/26750#discussion_r2272571774
More information about the hotspot-compiler-dev
mailing list