Class CompilerHints


  • public class CompilerHints
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String LIST  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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)  
      protected java.util.List<java.io.Reader> getReaders()
      Helper method for creating a Reader for the list file.
      static java.lang.String hintsFile()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • hintsFile

        public static java.lang.String hintsFile()
      • fromResource

        public static CompilerHints fromResource​(java.lang.String resource)
      • fromFile

        public static CompilerHints fromFile​(java.lang.String file)
      • get

        public java.util.Set<java.lang.String> get()
      • getCompileCommandFiles

        public static java.util.List<java.lang.String> getCompileCommandFiles​(java.util.List<java.lang.String> command)
        Parameters:
        command - command arguments list
        Returns:
        the compiler hint files specified by the command
      • addCompilerHints

        public 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

        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
      • getReaders

        protected java.util.List<java.io.Reader> getReaders()
        Helper method for creating a Reader for the list file.
        Returns:
        a correct Reader instance