public class CompilerHints extends AbstractResourceReader
Modifier and Type | Field and Description |
---|---|
private static CompilerHints |
defaultList |
(package private) static java.lang.String[] |
HINT_COMPATIBLE_JVMS |
private java.util.Set<java.lang.String> |
hints |
private static java.lang.String |
hintsFile |
(package private) static java.lang.String |
JVM_ZING |
static java.lang.String |
LIST |
(package private) static java.lang.String |
XX_COMPILE_COMMAND_FILE |
Modifier | Constructor and Description |
---|---|
private |
CompilerHints(java.lang.String file,
java.lang.String resource) |
Modifier and Type | Method and Description |
---|---|
static void |
addCompilerHints(java.util.List<java.lang.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 files
|
static CompilerHints |
defaultList() |
static CompilerHints |
fromFile(java.lang.String file) |
static CompilerHints |
fromResource(java.lang.String resource) |
java.util.Set<java.lang.String> |
get() |
static java.util.List<java.lang.String> |
getCompileCommandFiles(java.util.List<java.lang.String> command) |
static java.lang.String |
hintsFile() |
private static boolean |
isHintCompatibleVM()
FIXME (low priority): check if supplied JVM is hint compatible.
|
private static java.lang.String |
mergeHintFiles(java.util.List<java.lang.String> compileCommandFiles) |
private java.util.Set<java.lang.String> |
read() |
private static void |
removeCompileCommandFiles(java.util.List<java.lang.String> command,
java.util.List<java.lang.String> compileCommandFiles) |
getReaders
public static final java.lang.String LIST
static final java.lang.String[] HINT_COMPATIBLE_JVMS
static final java.lang.String JVM_ZING
private static volatile CompilerHints defaultList
private static volatile java.lang.String hintsFile
private final java.util.Set<java.lang.String> hints
static final java.lang.String XX_COMPILE_COMMAND_FILE
private CompilerHints(java.lang.String file, java.lang.String resource)
public static CompilerHints defaultList()
public static java.lang.String hintsFile()
public static CompilerHints fromResource(java.lang.String resource)
public static CompilerHints fromFile(java.lang.String file)
private static boolean isHintCompatibleVM()
public java.util.Set<java.lang.String> get()
private java.util.Set<java.lang.String> read()
public static java.util.List<java.lang.String> getCompileCommandFiles(java.util.List<java.lang.String> command)
command
- command arguments listpublic static void addCompilerHints(java.util.List<java.lang.String> command)
This is a departure from default JVM behavior as the JVM would normally just take the last hints file and ignore the rest.
command
- all -XX:CompileCommandLine args will be removed and a merged file will be setprivate static void removeCompileCommandFiles(java.util.List<java.lang.String> command, java.util.List<java.lang.String> compileCommandFiles)
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 listprivate static java.lang.String mergeHintFiles(java.util.List<java.lang.String> compileCommandFiles)