Skip to content
Permalink
Browse files

8235934: gc/g1/TestGCLogMessages.java fails with 'DerivedPointerTable…

… Update' found

Fix determining whether C2 or JVMCI are enabled in the test.

Reviewed-by: sjohanss, kbarrett
  • Loading branch information
Thomas Schatzl
Thomas Schatzl committed Jan 8, 2020
1 parent ef5b447 commit 89f2d145181880b2d168c81b68c9e02db3328d62
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1986,6 +1986,14 @@ WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env))
#endif // INCLUDE_CDS
WB_END

WB_ENTRY(jboolean, WB_isC2OrJVMCIIncludedInVmBuild(JNIEnv* env))
#if COMPILER2_OR_JVMCI
return true;
#else
return false;
#endif
WB_END

WB_ENTRY(jboolean, WB_IsJavaHeapArchiveSupported(JNIEnv* env))
return HeapShared::is_heap_object_archiving_allowed();
WB_END
@@ -2411,6 +2419,7 @@ static JNINativeMethod methods[] = {
{CC"areOpenArchiveHeapObjectsMapped", CC"()Z", (void*)&WB_AreOpenArchiveHeapObjectsMapped},
{CC"isCDSIncludedInVmBuild", CC"()Z", (void*)&WB_IsCDSIncludedInVmBuild },
{CC"isJFRIncludedInVmBuild", CC"()Z", (void*)&WB_IsJFRIncludedInVmBuild },
{CC"isC2OrJVMCIIncludedInVmBuild", CC"()Z", (void*)&WB_isC2OrJVMCIIncludedInVmBuild },
{CC"isJavaHeapArchiveSupported", CC"()Z", (void*)&WB_IsJavaHeapArchiveSupported },
{CC"cdsMemoryMappingFailed", CC"()Z", (void*)&WB_CDSMemoryMappingFailed },

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -87,7 +87,7 @@ public LogMessageWithLevelC2OrJVMCIOnly(String message, Level level) {
}

public boolean isAvailable() {
return Compiler.isC2Enabled() || Compiler.isGraalEnabled();
return Compiler.isC2OrJVMCIIncludedInVmBuild();
}
}

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -227,6 +227,8 @@ public boolean g1BelongsToFreeRegion(long adr) {
public native void NMTArenaMalloc(long arena, long size);

// Compiler
public native boolean isC2OrJVMCIIncludedInVmBuild();

public native int matchesMethod(Executable method, String pattern);
public native int matchesInline(Executable method, String pattern);
public native boolean shouldPrintAssembly(Executable method, int comp_level);
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,15 @@

private static final WhiteBox WB = WhiteBox.getWhiteBox();

/**
* Check if C2 or JVMCI were included in the VM build
*
* @return true if either C2 or JVMCI were included in the VM build.
*/
public static boolean isC2OrJVMCIIncludedInVmBuild() {
return WB.isC2OrJVMCIIncludedInVmBuild();
}

/**
* Check if Graal is used as JIT compiler.
*

0 comments on commit 89f2d14

Please sign in to comment.