RFR: 8330157: C2: Add a stress flag for bailouts [v4]

Daniel Skantz duke at openjdk.org
Wed Jun 19 07:09:11 UTC 2024


On Wed, 12 Jun 2024 15:21:16 GMT, Daniel Skantz <duke at openjdk.org> wrote:

>> src/hotspot/share/opto/compile.hpp line 831:
>> 
>>> 829: 
>>> 830:   const CompilationFailureInfo* first_failure_details() const { return _first_failure_details; }
>>> 831: 
>> 
>> - Why guarantees? Why not assert? Do we really want this stress code in release builds? 
>> - If assert, the `skip` parameter can be DEBUG_ONLY. 
>> - In any case, I would rename it since is not very clear without examining the source code now. We don't skip the error check, we override the random stress bailout check. E.g. something like `DEBUG_ONLY(bool no_stress_bailout)` ?
>
> Enabling the stress code in debug builds too could work. I can give it a try, but it will require some  time for more testing.

Enabling the new flag in debug builds works if we weaken some existing asserts to allow artificial failures. I'm considering making this stress mode debug-only.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19646#discussion_r1645530752


More information about the hotspot-compiler-dev mailing list