public class ProfilingInfoTest extends GraalCompilerTest
NOTE: These tests are actually not very robust. The problem is that only partial profiling
information may be gathered for any given method. For example, HotSpot's advanced compilation
policy can decide to only gather partial profiles in a first level compilation (see
AdvancedThresholdPolicy::common(...) in advancedThresholdPolicy.cpp). Because of this,
occasionally tests for ProfilingInfo.getNullSeen(int)
can fail since HotSpot only set's
the null_seen bit when doing full profiling.
GraalCompilerTest.ArgSupplier, GraalCompilerTest.Result
GraalTest.MultiCauseAssertionError
Modifier and Type | Field and Description |
---|---|
private static double |
DELTA |
private static int |
N |
lastCompiledGraph
Constructor and Description |
---|
ProfilingInfoTest() |
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 int N
private static final double DELTA
public ProfilingInfoTest()
public void testBranchTakenProbability()
public static int branchProbabilitySnippet(int value)
public void testSwitchProbabilities()
public static int switchProbabilitySnippet(int value)
public void testProfileInvokeVirtual()
public static int invokeVirtualSnippet(Object obj)
public void testTypeProfileInvokeInterface()
public static int invokeInterfaceSnippet(CharSequence a)
public void testTypeProfileCheckCast()
public static Serializable checkCastSnippet(Object obj)
public void testTypeProfileInstanceOf()
public static boolean instanceOfSnippet(Object obj)
private void testTypeProfile(String testSnippet, int bci)
public void testExceptionSeen()
public static int nullPointerExceptionSnippet(Object obj)
public static int arrayIndexOutOfBoundsExceptionSnippet(int[] array)
public static int checkCastExceptionSnippet(Object obj)
public static int invokeWithExceptionSnippet(boolean doThrow)
private static int throwException(boolean doThrow)
public void testNullSeen()
private void testNullSeen(String snippet)
private ProfilingInfo profile(String methodName, Object... args)
private void continueProfiling(String methodName, Object... args)
private void continueProfiling(int executions, String methodName, Object... args)
private ProfilingInfo profile(boolean resetProfile, int executions, String methodName, Object... args)
private void resetProfile(String methodName)