RFR: 8370077: C2: make Compile::_major_progress a boolean

Vladimir Kozlov kvn at openjdk.org
Wed Oct 22 16:36:21 UTC 2025


On Wed, 22 Oct 2025 07:36:35 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> Or you can keep temporary (just for testing this PR and remove it before integration) original logic in debug VM to compare result of `major_progress()`.
>
> @vnkozlov I fear I don't understand what you're suggesting.
> 
> I've tried to add in my `set_major_progress(bool)` an assert to check we are not in the 3rd case, the one where the assignment-semantics and the OR-semantics mismatch (that is with `progress` parameter (old progress) unset and current `_major_progress` set). And indeed the assert does not fire in tier1-6+some other internal testing.

@marc-chevalier 

Here is what I am proposing to check if functionality is preserved and answer @eme64 concern.

1. make sure `_major_progress` accessed/updated through accessors methods.
2. add "new" field `_old_major_progress`
3. Restore old accessors methods but rename them with prefix `old_` and use them to update/access `_old_major_progress`
4. In new `major_progress()` add `assert((_old_major_progress > 0) == _major_progress, "should match")`. You can print values if they are not matching.

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

PR Comment: https://git.openjdk.org/jdk/pull/27912#issuecomment-3433257601


More information about the hotspot-compiler-dev mailing list