Integrated: 8269574: C2: Avoid redundant uncommon traps in GraphKit::builtin_throw() for JVMTI exception events
Richard Reingruber
rrich at openjdk.java.net
Wed Jul 7 07:20:55 UTC 2021
On Tue, 29 Jun 2021 12:48:23 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
> This change moves the first uncommon trap in `GraphKit::builtin_throw()` to the block where it is actually needed because it has a return statement.
>
> Other paths reach the second uncommon trap at the end of `GraphKit::builtin_throw()`. On these paths the first UCT is not needed.
>
> The change improves performance if the VM can post exceptions to JVMTI agents.
> E.g. I found that the change improves the score for the compiler.compiler benchmark of SPECjvm2008 by 4% if the JDWP agent is loaded (see attachment in JBS).
>
> Note that with the change we can trap with `Deoptimization::Action_maybe_recompile` if we don't throw a preallocated exception where before we would have trapped with `Deoptimization::Action_none` if it was for posting the exception to JVMTI. I'd think this is preferable.
>
> The fix passed our CI testing: JCK and JTREG, also in Xcomp mode, SPECjvm2008, SPECjbb2015, Renaissance Suite,
> SAP specific tests with fastdebug and release builds on all platforms.
This pull request has now been integrated.
Changeset: 72530ef6
Author: Richard Reingruber <rrich at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/72530ef666ce2ace899cf34faefe715539d1ee25
Stats: 14 lines in 1 file changed: 7 ins; 7 del; 0 mod
8269574: C2: Avoid redundant uncommon traps in GraphKit::builtin_throw() for JVMTI exception events
Reviewed-by: kvn, roland, neliasso
-------------
PR: https://git.openjdk.java.net/jdk/pull/4623
More information about the hotspot-compiler-dev
mailing list