< prev index next > src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java
Print this page
}
}
return logOrDump(resultInstalledCode, compiledCode);
}
! @Override
- public void invalidateInstalledCode(InstalledCode installedCode) {
if (installedCode instanceof HotSpotNmethod) {
HotSpotNmethod nmethod = (HotSpotNmethod) installedCode;
! nmethod.invalidate(true);
} else {
throw new IllegalArgumentException("Cannot invalidate a " + Objects.requireNonNull(installedCode).getClass().getName());
}
}
@Override
public TargetDescription getTarget() {
return target;
}
}
}
return logOrDump(resultInstalledCode, compiledCode);
}
! public void invalidateInstalledCode(InstalledCode installedCode, int invalidationReason) {
if (installedCode instanceof HotSpotNmethod) {
HotSpotNmethod nmethod = (HotSpotNmethod) installedCode;
! nmethod.invalidate(true, invalidationReason);
} else {
throw new IllegalArgumentException("Cannot invalidate a " + Objects.requireNonNull(installedCode).getClass().getName());
}
}
+ @Override
+ public void invalidateInstalledCode(InstalledCode installedCode) {
+ invalidateInstalledCode(installedCode, jvmciInvalidationReason());
+ }
+
@Override
public TargetDescription getTarget() {
return target;
}
* Resets all compilation statistics.
*/
public void resetCompilationStatistics() {
runtime.getCompilerToVM().resetCompilationStatistics();
}
+
+ private static int jvmciInvalidationReason() {
+ return HotSpotJVMCIRuntime.runtime().config.getConstant("nmethod::InvalidationReason::JVMCI_INVALIDATE", Integer.class);
+ }
}
< prev index next >