RFR: 8267532: C2: Profile and prune untaken exception handlers [v5]
Jorn Vernee
jvernee at openjdk.org
Fri Nov 17 15:46:37 UTC 2023
On Wed, 15 Nov 2023 17:42:52 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> > Missing profiling would be bad, as in that case we'd always try to prune the exception handler. i.e. it's not just a missed optimization.
>
> Yes, pathological recompilation is another scenario to consider. You can sprinkle `Compile::too_many_traps` checks (both as asserts and product checks) to ensure profiling information is up-to-date.
I also realize that what I said here is not quite true, as we mark the handler as entered in the deopt code. So, if we deopt once, we won't get an uncommon trap again. (there's a test case for that as well).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16416#issuecomment-1816659130
More information about the hotspot-dev
mailing list