Package org.openjdk.jmh.runner
Class CompilerHints
java.lang.Object
org.openjdk.jmh.runner.AbstractResourceReader
org.openjdk.jmh.runner.CompilerHints
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enum
private static enum
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String
(package private) static final String
(package private) static final boolean
(package private) static final boolean
(package private) static final String
private static CompilerHints.BlackholeMode
private static CompilerHints.BlackholeSelect
private static CompilerHints
(package private) static final String[]
private static String
(package private) static final String
static final String
(package private) static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCompilerHints
(List<String> command) We need to generate a compiler hints file such that it includes: No compile command files are specified and no .hotspotrc file is available, then do JMH hints only No compile command files are specified and .hotspotrc file is available, then do JMH hints + .hotspotrc 1 to N compile command files are specified, then do JMH hints + all specified hints in filesprivate static CompilerHints.BlackholeMode
private static CompilerHints.BlackholeSelect
private static boolean
private static void
static CompilerHints
static CompilerHints
static CompilerHints
fromResource
(String resource) get()
getCompileCommandFiles
(List<String> command) static String
private static boolean
FIXME (low priority): check if supplied JVM is hint compatible.private static String
mergeHintFiles
(List<String> compileCommandFiles) static void
static void
printWarnings
(PrintStream out) read()
private static void
removeCompileCommandFiles
(List<String> command, List<String> compileCommandFiles) Methods inherited from class org.openjdk.jmh.runner.AbstractResourceReader
getReaders
-
Field Details
-
LIST
- See Also:
-
HINT_COMPATIBLE_JVMS
-
JVM_ZING
- See Also:
-
defaultList
-
hintsFile
-
hints
-
XX_COMPILE_COMMAND_FILE
- See Also:
-
BLACKHOLE_MODE_NAME
- See Also:
-
BLACKHOLE_AUTODETECT_NAME
- See Also:
-
BLACKHOLE_DEBUG_NAME
- See Also:
-
BLACKHOLE_MODE_AUTODETECT
static final boolean BLACKHOLE_MODE_AUTODETECT -
BLACKHOLE_MODE_DEBUG
static final boolean BLACKHOLE_MODE_DEBUG -
blackholeMode
-
blackholeSelect
-
-
Constructor Details
-
CompilerHints
-
-
Method Details
-
defaultList
-
hintsFile
-
fromResource
-
fromFile
-
isHintCompatibleVM
private static boolean isHintCompatibleVM()FIXME (low priority): check if supplied JVM is hint compatible. This test is applied to the Runner VM, not the Forked and may therefore be wrong if the forked VM is not the same JVM -
get
-
read
-
getCompileCommandFiles
- Parameters:
command
- command arguments list- Returns:
- the compiler hint files specified by the command
-
addCompilerHints
We need to generate a compiler hints file such that it includes:- No compile command files are specified and no .hotspotrc file is available, then do JMH hints only
- No compile command files are specified and .hotspotrc file is available, then do JMH hints + .hotspotrc
- 1 to N compile command files are specified, then do JMH hints + all specified hints in files
This is a departure from default JVM behavior as the JVM would normally just take the last hints file and ignore the rest.
- Parameters:
command
- all -XX:CompileCommandLine args will be removed and a merged file will be set
-
removeCompileCommandFiles
private static void removeCompileCommandFiles(List<String> command, List<String> compileCommandFiles) - Parameters:
command
- the compile command file options will be removed from this commandcompileCommandFiles
- the compiler hint files specified by the command will be added to this list
-
mergeHintFiles
-
blackholeMode
-
blackholeSelect
-
compilerBlackholesAvailable
private static boolean compilerBlackholesAvailable() -
debug
-
printBlackhole
-
printWarnings
-