RFR: 8267532: C2: Profile and prune untaken exception handlers [v5]

Jorn Vernee jvernee at openjdk.org
Wed Nov 15 04:24:32 UTC 2023


On Wed, 15 Nov 2023 03:43:50 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> I'm more concerned about other places where we may omit profiling and hence miss optimization opportunities.

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. The code in the PR tries to avoid that by checking if the profile is mature before pruning, but if there are cases where the profile is mature, and we somehow did not detect the exception handler being entered, we might get into a situation where the compiled code is immediately thrown away, because we actually do regularly throw exceptions that then hit the pruned handler and cause a deoptimization.

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

PR Comment: https://git.openjdk.org/jdk/pull/16416#issuecomment-1811786117


More information about the hotspot-dev mailing list