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

Doug Simon dnsimon at openjdk.org
Mon Nov 6 09:07:17 UTC 2023


On Mon, 6 Nov 2023 08:11:01 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> src/hotspot/share/runtime/sharedRuntime.cpp line 681:
>> 
>>> 679: // for given exception
>>> 680: // Note that the implementation of this method assumes it's only called when an exception has actually occured
>>> 681: address SharedRuntime::compute_compiled_exc_handler(CompiledMethod* cm, address ret_pc, Handle& exception,
>> 
>> One thing of note for this function: We don't look up the exception handler bci for JVMCI compiled methods, so I've not added any profiling in the case of JVMCI (see the `#if INCLUDE_JVMCI` block at the start of the function).
>> 
>> This means that when using a JVMCI compiler, exception handlers might appear as untaken, when they are actually taken. This should be fine since the profiling information is currently only used by C2. But, if a JVMCI compiler wants to start using the profiling information e.g. to prune dead exception handlers as well, then profiling needs to be implement first.
>> 
>> Please let me know if this is okay.
>
> I think that's fine (@dougxc, fyi).

I also think it's fine but would like @tkrodriguez to confirm as well.

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

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


More information about the hotspot-dev mailing list