from my point of view, having the following code at the end of JvmtiManageCapabilities::init_onload_capabilities is much clear and easier to understand:
> // Workaround for 8195635: disable pop_frame and force_early_return > capabilities > #if INCLUDE_JVMCI > if (UseJVMCICompiler) { > jc.can_pop_frame = 0; > jc.can_force_early_return = 0; > } > #endif // INCLUDE_JVMCI Thanks, -- Igor > On Jan 30, 2019, at 9:18 PM, dean.l...@oracle.com wrote: > > On 1/30/19 8:59 PM, serguei.spit...@oracle.com > <mailto:serguei.spit...@oracle.com> wrote: >> So, the fix needs to be more like this: >> + // Workaround for 8195635: >> + // disable pop_frame and force_early_return capabilities with Graal >> + #if INCLUDE_JVMCI >> + if (!(EnableJVMCI && UseJVMCICompiler)) { >> jc.can_pop_frame = 1; >> jc.can_force_early_return = 1; >> + } >> + #endif >> >> Not sure, if the check for EnableJVMCI can be removed above. > > We still need it to work when INCLUDE_JVMCI is not defined. > How about > > JVMCI_ONLY(if (UseJVMCICompiler)) { > ... > } > > or > > if (JVMCI_ONLY(UseJVMCICompiler) NOT_JVMCI(true)) { > ... > } > > dl >