RFR: 8362564: hotspot/jtreg/compiler/c2/TestLWLockingCodeGen.java fails on static JDK on x86_64 with AVX instruction extensions

Evgeny Astigeevich eastigeevich at openjdk.org
Fri Jul 25 14:43:55 UTC 2025


On Thu, 24 Jul 2025 22:27:56 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

>> src/hotspot/share/runtime/stubRoutines.cpp line 170:
>> 
>>> 168:   // When new stubs added we need to make sure there is some space left
>>> 169:   // to catch situation when we should increase size again.
>>> 170:   assert(code_size == 0 || buffer.insts_remaining() > 200, "increase %s", assert_msg);
>> 
>> What is the reason to move the assert?
>
> @eastig Thanks for taking a look!
> 
> The log `Info, stubs` output provides useful details. With the assertion failure, it wouldn't show. That's why moving the assert to after the log output.

If you need information which is printed out in the log, why not to add needed information to the assert? You can copy the format string used for logging. This will make assert's output more informative without a need for enabling logging.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26395#discussion_r2231292404


More information about the hotspot-dev mailing list