RFR: 8297431: [JVMCI] HotSpotJVMCIRuntime.encodeThrowable should not throw an exception [v2]

Doug Simon dnsimon at openjdk.org
Wed Nov 23 10:58:05 UTC 2022


On Tue, 22 Nov 2022 16:29:58 GMT, Tom Rodriguez <never at openjdk.org> wrote:

>> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add more context when possible to exception translation errors
>
> src/hotspot/share/jvmci/jvmciEnv.cpp line 321:
> 
>> 319:       jlong buffer = (jlong) NEW_RESOURCE_ARRAY_IN_THREAD_RETURN_NULL(THREAD, jbyte, buffer_size);
>> 320:       if (buffer == 0L) {
>> 321:         decode(THREAD, runtimeKlass, 0L);
> 
> Can we add an argument so that each of these call sites reports a unique message?  Should we get the class name from the pending exception and include that as well?  I think we should include enough breadcrumbs for future failures in the this path that we might have a better guess what's happening.

I think the case we care about most is an `OutOfMemoryError` occurring in the HotSpot heap so I've pushed a change that calls this out. I've also distinguished the case where the native buffer for the encoding cannot be allocated (although if that happens, the VM is in real trouble).

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

PR: https://git.openjdk.org/jdk/pull/11286


More information about the hotspot-compiler-dev mailing list