Review request for JDK-8027709: JDK8 docs on -XX:CompileOnly option are incorrect

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Dec 10 17:07:07 PST 2013


Who did review of other flags description? I see that description of 
-Xcomp is also incorrect - it does not disable Interpreter, methods 
still can be executed in it. Also JIT compiler does not execute methods.
I think it should be:

      -Xcomp
           Force methods compilation on first invocation. By default,
           methods are compiled after number of interpreted method
           invocations. For example, for Client VM (-client)
           it is 1000 invocations and for Server VM (-server)
           it is 10000. Interpreted method invocations are used
           to gather information for efficient compilation.
           Use the -Xcomp flag to get compiled methods as soon
           as possible at the expense of efficiency.

           You can also change the number of interpreted method
           invocations before compilation using the
           -XX:CompileThreshold option.

I was only asking to display the text which you want to review. It looks 
fine.

Thanks,
Vladimir

Here is man page text:

      -XX:CompileCommand=command,method[,option]
           Specifies a command to perform on a method. For
           example, to exclude the indexOf() method of the String
           class from being compiled, use the following:

           -XX:CompileCommand=exclude,java/lang/String.indexOf

           Note that the full class name is specified, including
           all packages and subpackages separated by a slash (/).
           For easier cut and paste operations, it is also
           possible to use the method name format produced by the
           -XX:+PrintCompilation and -XX:+LogCompilation options:

           -XX:CompileCommand=exclude,java.lang.String::indexOf

           If the method is specified without the signature, the
           command will be applied to all methods with the
           specified name. However, you can also specify the
           signature of the method in the class file format. In
           this case, you should enclose the arguments in
           quotation marks, because otherwise the shell treats the
           semicolon as command end. For example, if you want to
           exclude only the indexOf(String) method of the String
           class from being compiled, use the following:

 
-XX:CompileCommand="exclude,java/lang/String.indexOf,(Ljava/lang/Strin
g;)I"

           You can also use the asterisk (*) as a wilcard for
           class and method names. For example, to exclude all
           indexOf() methods in all classes from being compiled,
           use the following:

           -XX:CompileCommand=exclude,*.indexOf

           The commas and periods are aliases for spaces, making
           it easier to pass compiler commands through a shell.
           You can pass arguments to -XX:CompileCommand using
           spaces as separators by enclosing the argument in
           quotation marks:

           -XX:CompileCommand="exclude java/lang/String indexOf"

           Note that after parsing the commands passed on the
           command line using the -XX:CompileCommand options, the
           JIT compiler then reads commands from the
           .hotspot_compiler file. You can add commands to this
           file or specify a different file using the
           -XX:CompileCommandFile option.

           To add several commands, either specify the
           -XX:CompileCommand option multiple times, or separate
           each argument with the newline separator (\n). The
           following commands are available:

           break
                Set a breakpoint when debugging the JVM to stop at
                the beginning of compilation of the specified
                method.

           compileonly
                Exclude all methods from compilation except for
                the specified method. As an alternative, you can
                use the -XX:CompileOnly option, which allows to
                specify several methods.

           dontinline
                Prevent inlining of the specified method.

           exclude
                Exclude the specified method from compilation.

           help Print a help message for the -XX:CompileCommand
                option.

           inline
                Attempt to inline the specified method.

           log  Exclude compilation logging (with the
                -XX:+LogCompilation option) for all methods except
                for the specified method. By default, logging is
                performed for all compiled methods.

           option
                This command can be used to pass a JIT compilation
                option to the specified method in place of the
                last argument (option). The compilation option is
                set at the end, after the method name. For
                example, to enable the BlockLayoutByFrequency
                option for the append() method of the StringBuffer
                class, use the following:

 
-XX:CompileCommand=option,java/lang/StringBuffer.append,BlockLayoutByFrequency

                You can specify multiple compilation options,
                separated by commas or spaces.

           print
                Print generated assembler code after compilation
                of the specified method.

           quiet
                Do not print the compile commands. By default, the
                commands that you specify with the
                -XX:CompileCommand option are printed; for
                example, if you exclude from compilation the
                indexOf() method of the String class, then the
                following will be printed to standard output:

                CompilerOracle: exclude java/lang/String.indexOf

                You can suppress this by specifying the
                -XX:CompileCommand=quiet option before other
                -XX:CompileCommand options.

      -XX:CompileCommandFile=filename
           Sets the file from which JIT compiler commands are
           read. By default, the .hotspot_compiler file is used to
           store commands performed by the JIT compiler.

           Each line in the command file represents a command, a
           class name, and a method name for which the command is
           used. For example, this line prints assembly code for
           the toString() method of the String class:

           print java/lang/String toString

           For more information about specifying the commands for
           the JIT compiler to perform on methods, see the
           -XX:CompileCommand option.

      -XX:CompileOnly=methods
           Sets the list of methods (separated by commas) to which
           compilation should be restricted. Only the specified
           methods will be compiled. Specify each method with the
           full class name (including the packages and
           subpackages). For example, to compile only the length()
           method of the String class and the size() method of the
           List class, use the following:

           -XX:CompileOnly=java/lang/String.length,java/util/List.size

           Note that the full class name is specified, including
           all packages and subpackages separated by a slash (/).
           For easier cut and paste operations, it is also
           possible to use the method name format produced by the
           -XX:+PrintCompilation and -XX:+LogCompilation options:

           -XX:CompileOnly=java.lang.String::length,java.util.List::size

           Although wildcards are not supported, you can specify
           only the class or package name to compile all methods
           in that class or package, as well as specify just the
           method to compile methods with this name in any class:

           -XX:CompileOnly=java/lang/String
           -XX:CompileOnly=java/lang
           -XX:CompileOnly=.length



On 12/10/13 7:41 AM, alexey zhebel wrote:
> I am sorry for another email, but the previous one was rejected. I
> should be a member of the jdk8-dev list now.
>
> Best regards,
> Alexey Zhebel
>
> On 10.12.2013 13:05, alexey zhebel wrote:
>> Sorry, here are the instructions.
>>
>> *Scope of Review*
>> _Sanity check content only_ as opposed to reviewing the nroff markup
>> itself.
>>
>> *How To View A Man Page*
>> 1. Download the nroff file in a directory
>> 2. Bring up a terminal window and change to that directory.
>> 3. View a man page with a command of the form "man -M man {pagename}".
>> For example, to view the javap man page, run the command:
>>
>>       $ man -M man javap
>>
>> Notes:
>> - (Linux and Mac only.) The -t option to the man command will
>> generate typeset output in PostScript format and send it to stdout:
>>
>>       $ man -M man -t javap > javap.ps
>>
>> PostScript can be displayed using Preview (on Mac) and by the Gnome
>> Document Viewer (Linux/Gnome). (On Solaris, the man -t option will
>> send the output to a printer, which might not be what you want.)
>>
>> If bullets render as a funny character, set Remote Character Set to
>> UTF-8 in your Putty terminal (Change Settings... > Window >
>> Translation > Remote character set > UTF-8)
>>
>> *What Changed*
>> I fixed descriptions for three options:
>> -XX:CompileCommand
>> -XX:CompileCommandFile
>> -XX:CompileOnly
>>
>> When viewing a man page, type /-XX:CompileCommand and press Enter to
>> go directly to that option. The other two follow it directly.
>> Best regards,
>> Alexey Zhebel
>> On 10.12.2013 0:54, Vladimir Kozlov wrote:
>>> Alexey,
>>>
>>> Can you show resulting output text? It is difficult to review these
>>> nroff changes.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 12/9/13 12:05 PM, alexey zhebel wrote:
>>>> Hi all!
>>>>
>>>> I fixed the bug from the subject in the source for the tools docs. The
>>>> corresponding HTML reference page was reviewed by Kumar and Vladimir.
>>>> This request is for the same changes to the nroff man pages which are
>>>> single-sourced with the HTMLs.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8027709
>>>> Webrev: http://cr.openjdk.java.net/~azhebel/8027709/webrev/
>>>>
>>>> Thanks!
>>>>
>>
>


More information about the jdk8-dev mailing list