RFR: 8267532: Try/catch block not optimized as expected [v3]

Jorn Vernee jvernee at openjdk.org
Mon Nov 6 13:19:12 UTC 2023


On Mon, 6 Nov 2023 09:28:38 GMT, Yudi Zheng <yzheng at openjdk.org> wrote:

>> I also think it's fine but would like @tkrodriguez to confirm as well.
>
> I think it should be straightforward to add this profile for JVMCI compiler at line 693 with
> 
>       if (t->bci() != -1) { // did we find a handler in this method?
>         sd->method()->set_ex_handler_entered(t->bci()); // profile
>       }

Note that we don't have an `sd` at that point in the code. `cm->method()` only points at the top-level method, so we'd have to do the same method/handler bci lookup as we do for C2 in the big `while` loop below the JVMCI code. Given that we don't do that already, I figured JVMCI exception handler routing just worked differently, and there was another point (on the Java side maybe) where the method + bci is looked up.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16416#discussion_r1383314504


More information about the hotspot-dev mailing list