8234432: AOT tests failing with 'used 'epsilon gc' is different from current 'g1 gc'' after CMS removal

Reviewed-by: kvn
This commit is contained in:
Dean Long 2019-11-22 19:23:30 -08:00
parent 4edbdd1cb3
commit edf902a3c9
3 changed files with 14 additions and 1 deletions

View File

@ -465,6 +465,13 @@
declare_constant(CodeInstaller::INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED) \
declare_constant(CodeInstaller::INVOKE_INVALID) \
\
declare_constant(CollectedHeap::Serial) \
declare_constant(CollectedHeap::Parallel) \
declare_constant(CollectedHeap::G1) \
declare_constant(CollectedHeap::Epsilon) \
declare_constant(CollectedHeap::Z) \
declare_constant(CollectedHeap::Shenandoah) \
\
declare_constant(ConstantPool::CPCACHE_INDEX_TAG) \
declare_constant(ConstantPool::_has_dynamic_constant) \
\

View File

@ -51,6 +51,7 @@ import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
import org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory;
import org.graalvm.compiler.hotspot.HotSpotGraalOptionValues;
import org.graalvm.compiler.hotspot.HotSpotGraalRuntime;
import org.graalvm.compiler.hotspot.HotSpotGraalRuntime.HotSpotGC;
import org.graalvm.compiler.hotspot.HotSpotHostBackend;
import org.graalvm.compiler.hotspot.meta.HotSpotInvokeDynamicPlugin;
import org.graalvm.compiler.java.GraphBuilderPhase;
@ -223,7 +224,11 @@ public final class Main {
System.gc();
}
int gc = runtime.getGarbageCollector().ordinal() + 1;
HotSpotGC graal_gc = runtime.getGarbageCollector();
int def = graal_gc.ordinal() + 1;
String name = "CollectedHeap::" + graal_gc.name();
int gc = graalHotSpotVMConfig.getConstant(name, Integer.class, def);
BinaryContainer binaryContainer = new BinaryContainer(graalOptions, graalHotSpotVMConfig, graphBuilderConfig, gc, JVM_VERSION);
DataBuilder dataBuilder = new DataBuilder(this, backend, classes, binaryContainer);

View File

@ -232,6 +232,7 @@ public final class HotSpotGraalRuntime implements HotSpotGraalRuntimeProvider {
// Supported GCs
Serial(true, "UseSerialGC"),
Parallel(true, "UseParallelGC", "UseParallelOldGC"),
CMS(true, "UseConcMarkSweepGC"),
G1(true, "UseG1GC"),
// Unsupported GCs