OpenJDK / jdk / jdk
changeset 47804:fa06ab2a0570
8059334: nsk/jvmti/scenarios/hotswap/HS201/hs201t001 fails with exit code 0 after timeout
Summary: check if we are in "interp only" mode before returning an nm for an OSR request
Reviewed-by: sspitsyn, dcubed, kvn
author | cjplummer |
---|---|
date | Tue, 07 Nov 2017 14:13:18 -0800 |
parents | 2cd7d700217f |
children | 506775a4f446 |
files | src/hotspot/share/interpreter/interpreterRuntime.cpp |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp Tue Nov 07 08:47:47 2017 +0100 +++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp Tue Nov 07 14:13:18 2017 -0800 @@ -921,6 +921,14 @@ int bci = method->bci_from(last_frame.bcp()); nm = method->lookup_osr_nmethod_for(bci, CompLevel_none, false); } + if (nm != NULL && thread->is_interp_only_mode()) { + // Normally we never get an nm if is_interp_only_mode() is true, because + // policy()->event has a check for this and won't compile the method when + // true. However, it's possible for is_interp_only_mode() to become true + // during the compilation. We don't want to return the nm in that case + // because we want to continue to execute interpreted. + nm = NULL; + } #ifndef PRODUCT if (TraceOnStackReplacement) { if (nm != NULL) {