# HG changeset patch # User Doug Simon # Date 1443540535 -7200 # Node ID f53dfbf08c71ea1f202ef1f101a1d4ee374d9cab # Parent 2e71226319dabc82684ea82cd33a6763350b70a4 added CodeCacheProvider.invalidateInstalledCode and made CompilerToVM.invalidateInstalledCode package-private diff -r 2e71226319da -r f53dfbf08c71 jvmci/jdk.internal.jvmci.code/src/jdk/internal/jvmci/code/CodeCacheProvider.java --- a/jvmci/jdk.internal.jvmci.code/src/jdk/internal/jvmci/code/CodeCacheProvider.java Tue Sep 29 16:37:09 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.code/src/jdk/internal/jvmci/code/CodeCacheProvider.java Tue Sep 29 17:28:55 2015 +0200 @@ -88,6 +88,13 @@ InstalledCode installCode(CompilationRequest compRequest, CompilationResult compResult, InstalledCode installedCode, SpeculationLog log, boolean isDefault); /** + * Invalidates {@code installedCode} such that {@link InvalidInstalledCodeException} will be + * raised the next time {@code installedCode} is + * {@linkplain InstalledCode#executeVarargs(Object...) executed}. + */ + void invalidateInstalledCode(InstalledCode installedCode); + + /** * Gets a name for a {@link Mark} mark. */ default String getMarkName(Mark mark) { diff -r 2e71226319da -r f53dfbf08c71 jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java --- a/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java Tue Sep 29 16:37:09 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java Tue Sep 29 17:28:55 2015 +0200 @@ -486,7 +486,7 @@ * Invalidates {@code installedCode} such that {@link InvalidInstalledCodeException} will be * raised the next time {@code installedCode} is executed. */ - public void invalidateInstalledCode(InstalledCode installedCode) { + void invalidateInstalledCode(InstalledCode installedCode) { invalidateInstalledCodeImpl(installedCode); } diff -r 2e71226319da -r f53dfbf08c71 jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotCodeCacheProvider.java --- a/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotCodeCacheProvider.java Tue Sep 29 16:37:09 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotCodeCacheProvider.java Tue Sep 29 17:28:55 2015 +0200 @@ -169,6 +169,10 @@ return logOrDump(resultInstalledCode, compResult); } + public void invalidateInstalledCode(InstalledCode installedCode) { + runtime.getCompilerToVM().invalidateInstalledCode(installedCode); + } + public boolean needsDataPatch(JavaConstant constant) { return constant instanceof HotSpotMetaspaceConstant; }