RFR: 8319879: Stress mode to randomize incremental inlining decision
Vladimir Kozlov
kvn at openjdk.org
Tue Nov 14 17:38:31 UTC 2023
On Tue, 14 Nov 2023 07:10:43 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> Thanks for looking at this, Vladimir.
>
> > I wish it was one flag - too much duplication. But I see why you separated them: to get randomness only if AlwaysIncrementalInline is not specified. If AlwaysIncrementalInline was tuple {false | true | random} it would solve this.
>
> Right, a tuple would be better but then again we might want to merge all these stress flags into one flag at some point. For simplicity (and backport-ability), let's keep them separated for now and do a cleanup later. There's more to come, especially in the area of loop opts.
Can we change meaning of `-XX:+AlwaysIncrementalInline -XX:+StressIncrementalInlining` combination?
Currently with `-XX:+AlwaysIncrementalInline` we ignore `StressIncrementalInlining` setting.
What if `-XX:+StressIncrementalInlining` enables `-XX:+AlwaysIncrementalInline` but make it random (my tuple idea).
In such case you don't need to check `StressIncrementalInlining` where you check `AlwaysIncrementalInline`.
But the randomizing condition have to be change:
bool should_delay = AlwaysIncrementalInline && (!StressIncrementalInlining || (C->random() % 2) == 0);
Also `-XX:-AlwaysIncrementalInline` will disable `StressIncrementalInlining` so you don't need to update tests.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16597#issuecomment-1810770278
More information about the hotspot-compiler-dev
mailing list