RFR: 8256508: Improve CompileCommand flag
Claes Redestad
redestad at openjdk.java.net
Fri Nov 20 12:35:02 UTC 2020
On Tue, 17 Nov 2020 21:41:23 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:
> The current implementation of compile command has two types of options. Types pre-defined options like "compileonly" and the general 'option' type.
>
> 'option'-type are not defined, they can accidentally be used with the wrong value type, and the syntax is prone to error.
>
> By pre-defining all compile commands used and giving them types the parsing can be simplified, proper parsing errors can be given and and reasonable syntax can be used.
>
> This:
> -XX:CompileCommand=option,java/util/String.toString,int,RepeatCompilation,5
>
> Is superseded by:
> -XX:CompileCommand=RepeatCompilation,java/util/String.toString,5
>
> Attention check: Did you spot the error in the old command?
>
> In order not to break anything - the old syntax is kept for now. But even the old command format is improved with verification for the option name and the type of the value.
A good usability improvement!
I've messed up some minor details in these commands in one way or another more times than I've gotten things right on the first try and been left wondering why my commands have no effect. This should help avoid a significant portion of easy mistakes.
I think the error in the old compile command is that int needs to be intx (and of course there's no java/util/String)?
-------------
Marked as reviewed by redestad (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1276
More information about the hotspot-compiler-dev
mailing list