RFR: Fix Minimal VM build failures [v2]

Chris Plummer cjplummer at openjdk.java.net
Tue Sep 28 07:26:59 UTC 2021


On Mon, 27 Sep 2021 22:12:38 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> src/hotspot/share/runtime/thread.cpp line 1790:
>> 
>>> 1788: #if INCLUDE_JVMTI
>>> 1789:   assert(JvmtiVTMTDisabler::VTMT_count() == 0, "must be 0");
>>> 1790: #endif
>> 
>> All body needs to be under `#if INCLUDE_JVMTI ... #endif` for functions:
>>   `set_is_in_VTMT` and `set_is_VTMT_disabler` .
>> Is there any specific reason not to do that?
>> Also, it makes sense to add this fragment as well:
>> 
>> #else
>>   ShouldNotReachHere();
>>   return NULL;
>> #endif
>
> I think these APIs should be completely #ifdef'd out, and you also need to wrap the declarations with JVMTI_ONLY macros or append NOT_JVMTI_RETURN to the declarations.

If you #ifdef out the API, then you know it's not being called, thus no need for #else sections and calls to fatal().

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

PR: https://git.openjdk.java.net/loom/pull/67


More information about the loom-dev mailing list