On Mon, 26 Jun 2023 13:17:25 GMT, Doug Simon <dnsi...@openjdk.org> wrote:

>> The VMSupport class is required for translating an exception between the 
>> HotSpot and libgraal heaps.
>> Loading it lazily can result in a loading exception, obscuring the exception 
>> being translated.
>> To avoid this, VMSupport is loaded eagerly along with the other vmClasses.
>
> Doug Simon has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   each exception translation failure should trigger a JVMCI event

It may be in the noise but noise adds up over time.

It just seems to me that the simplest fix here would have been to convert

Klass* vmSupport = 
SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_vm_VMSupport(), true, 
THREAD);
guarantee(!HAS_PENDING_EXCEPTION, "");

to

Klass* vmSupport = 
SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_vm_VMSupport(), true, 
CHECK);

and just return on exception. A very isolated change with zero impact on 
anything else.

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

PR Comment: https://git.openjdk.org/jdk/pull/14641#issuecomment-1608455121

Reply via email to