public class WriteBarrierAdditionTest extends GraalCompilerTest
Modifier and Type | Class and Description |
---|---|
static class |
WriteBarrierAdditionTest.Container |
GraalCompilerTest.ArgSupplier, GraalCompilerTest.Result
GraalTest.MultiCauseAssertionError
Modifier and Type | Field and Description |
---|---|
(package private) static WriteBarrierAdditionTest.Container |
con |
private static HotSpotVMConfig |
config |
(package private) static Object[] |
dst |
private static long |
referentOffset |
(package private) static Object[] |
src |
(package private) static WeakReference<Object> |
wr |
lastCompiledGraph
Constructor and Description |
---|
WriteBarrierAdditionTest() |
Modifier and Type | Method and Description |
---|---|
private HotSpotInstalledCode |
getInstalledCode(String name,
boolean withUnsafePrefix) |
void |
test1()
Expected 2 barriers for the Serial GC and 4 for G1 (2 pre + 2 post).
|
void |
test10()
The following test concerns the runtime checks of the unsafe loads.
|
void |
test11() |
static void |
test1Snippet() |
void |
test2()
Expected 4 barriers for the Serial GC and 8 for G1 (4 pre + 4 post).
|
private void |
test2(String snippet,
Object... args) |
static void |
test2Snippet(boolean test) |
void |
test3()
Expected 4 barriers for the Serial GC and 8 for G1 (4 pre + 4 post).
|
static void |
test3Snippet() |
void |
test4()
Expected 2 barriers for the Serial GC and 5 for G1 (3 pre + 2 post) The (2 or 4) barriers are
emitted while initializing the fields of the WeakReference instance.
|
static Object |
test4Snippet() |
void |
test5()
Expected 4 barriers for the Serial GC and 9 for G1 (1 ref + 4 pre + 4 post).
|
static Object |
test5Snippet() |
void |
test6()
The following test concerns the runtime checks of the unsafe loads.
|
void |
test7()
The following test concerns the runtime checks of the unsafe loads.
|
void |
test8()
The following test concerns the runtime checks of the unsafe loads.
|
void |
test9()
The following test concerns the runtime checks of the unsafe loads.
|
static void |
testArrayCopy(Object a,
Object b,
Object c) |
private void |
testHelper(String snippetName,
int expectedBarriers) |
static Object |
testUnsafeLoad(sun.misc.Unsafe theUnsafe,
Object a,
Object b,
Object c) |
addMethod, after, afterTest, applyArgSuppliers, argsWithReceiver, asResolvedJavaMethod, assertConstantReturn, assertEquals, assertEquals, assertEquals, before, beforeTest, branchProbability, breakpoint, breakpoint, checkArgs, checkHighTierGraph, checkLowTierGraph, checkMidTierGraph, compile, countUnusedConstants, createLIRSuites, createSuites, editGraphBuilderConfiguration, executeActual, executeActualCheckDeopt, executeExpected, getBackend, getCanonicalGraphString, getCode, getCode, getCode, getCodeCache, getConstantReflection, getCustomGraphBuilderSuite, getDefaultGraphBuilderPlugins, getDefaultGraphBuilderSuite, getDefaultHighTierContext, getLIRSuites, getLowerer, getMetaAccess, getNodeCountExcludingUnusedConstants, getProviders, getReplacements, getResolvedJavaMethod, getResolvedJavaMethod, getResolvedJavaMethod, getSnippetReflection, getSpeculationLog, getSuites, getTarget, initializeDebugging, invoke, isArchitecture, iterationCount, lookupMethod, parseDebug, parseEager, parseEager, parseForCompile, parseProfiled, parseProfiled, referenceInvoke, supply, test, test, testAgainstExpected, testAgainstExpected, testN
assertDeepEquals, assertDeepEquals, assertDeepEquals, assertDeepEquals, assertFalse, assertFalse, assertFalse, assertTrue, assertTrue, assertTrue, equalFloatsOrDoublesDelta, fail, getMethod, getMethod, getMethod, ulpsDelta
private static final HotSpotVMConfig config
private static final long referentOffset
static WeakReference<Object> wr
static WriteBarrierAdditionTest.Container con
public WriteBarrierAdditionTest()
public void test1() throws Exception
Exception
public static void test1Snippet()
public void test2() throws Exception
Exception
public static void test2Snippet(boolean test)
public void test3() throws Exception
Exception
public static void test3Snippet()
public void test4() throws Exception
Exception
public static Object test4Snippet()
public void test5() throws Exception
Exception
public static Object test5Snippet() throws Exception
Exception
public void test6() throws Exception
Exception
public void test7() throws Exception
Exception
public void test8() throws Exception
Exception
public void test10() throws Exception
Exception
public void test9() throws Exception
Exception
public static void testArrayCopy(Object a, Object b, Object c) throws Exception
Exception
public static Object testUnsafeLoad(sun.misc.Unsafe theUnsafe, Object a, Object b, Object c) throws Exception
Exception
private HotSpotInstalledCode getInstalledCode(String name, boolean withUnsafePrefix) throws Exception
Exception
private void testHelper(String snippetName, int expectedBarriers) throws Exception, SecurityException
Exception
SecurityException