RFR(L): JEP165: Compiler Control
Nils Eliasson
nils.eliasson at oracle.com
Wed Sep 23 14:05:59 UTC 2015
Hi Chris,
On 2015-09-22 23:22, Christian Thalinger wrote:
> Here are a couple of comments I had after looking over this briefly:
>
> src/share/vm/ci/ciEnv.hpp:
>
> + DirectiveSet* dirset() { return _directive_set; }
>
> Can you change the name of this method? I’d go with directive_set() (or directives(); see below).
>
> src/share/vm/compiler/compilerDirectives.hpp:
>
> Could DirectiveSet maybe just be called Directives?
There are Directives that contains a DirectiveSet for each compiler. I
have considered changing these names to avoid confusion.
>
> 89 bool inline_commanded(ciMethod* inlinee);
> 90 bool dont_inline_commanded(ciMethod* inlinee);
>
> I’d call these should_inline and should_not_inline.
Yes. I used another name to make a distinction between the should_inline
on annotations and should_inline on directives/compilecommands. But then
I moved the methods and it will be obvious by the context.
>
> 92 DirectiveSet* late_cc_init(methodHandle method);
>
> What does late_cc_init mean? Please use a more descriptive name.
late initatilation for compilecommand backwards compatibility :)
> src/share/vm/compiler/directivesparser.cpp:
> src/share/vm/compiler/directivesparser.hpp:
>
> Rename these files to directivesParser.*
Yes,
>
> src/share/vm/utilities/json.cpp:
>
> Will this JSON code be used by other code later?
No. We have kept it separated so it is easy to replace in the future.
New webrev coming up.
Thanks,
//Nils
>
>> On Sep 22, 2015, at 7:21 AM, Nils Eliasson <nils.eliasson at oracle.com> wrote:
>>
>> Hi,
>>
>> This is the initial RFR for JEP165: Compiler Control. This feature enables runtime manageable, method dependent compiler flags. (Immutable for the duration of a compilation.)
>>
>> The change includes:
>> - A parser for the directives format (json like) including vmtests (json.cpp/hpp)
>> - A component for construction of compiler directives (directivesParser.cpp/hpp)
>> - The directives including the option definitions, default values and compilecommand relations (compilerDirectives.cpp/hpp)
>> - Diagnostic commands for working with the directives - installing, removing, printing
>> - Lots of small changes wherever we access flags or legacy compilecommands in the compiler
>>
>> Notes:
>> The feature is documented in the JEP (https://bugs.openjdk.java.net/browse/JDK-8046155).
>>
>> Currently only a small amount of compiler flags are included in the change. The flags are a representative selection of different types targeting both compilers. All of them existed as CompilerOracle option commands. Two commands was not included in the directives due to time constraints - CompilerThresholdScaling and UseRTMLocks. Both are accessed from runtime (outside any compiler) and requires some special handling. (Solved but not implemented.)
>>
>> Full backwards compatibility with CompileCommands is implemented but can be turned off with flag -XX:CompileCommandCompatibilty. Also meta handling the compatibility flag by supporting it in the directives (test feature).
>>
>> The change contain some rough edges that will polished over the coming days.
>>
>> JEP: https://bugs.openjdk.java.net/browse/JDK-8046155
>> Hotspot webrev: http://cr.openjdk.java.net/~neliasso/8046155/webrev.01/
>> JDK webrev: http://cr.openjdk.java.net/~neliasso/8046155/webrev_jdk.01/
>>
>> Please review!
>>
>> Best regards,
>> Nils Eliasson
More information about the hotspot-compiler-dev
mailing list