Request for reviews (M): 6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
David Holmes
david.holmes at oracle.com
Tue Aug 21 17:19:52 PDT 2012
On 22/08/2012 8:47 AM, Vladimir Kozlov wrote:
> David Holmes wrote:
>> I see a lot of changes that aren't obviously pd flags. Is there some
>> other refactoring going on here?
>
> In addition to flags which were used only on one platforms some C2
> specific flags were moved into opto/c2_globals.hpp. And some unused
> flags were removed.
Ok. But the change in src/share/vm/opto/runtime.cpp seems unrelated to
this work.
I also think the macros for globals were better placed in globals.hpp
rather than being moved to macros.hpp.
>>
>> What happens today if these flags are specified on a platform that
>> doesn't use them - is it just ignored?
>
> They were ignored.
>
>> What happens with these changes? Unrecognized VM option? That could
>> break people's scripts.
>
> Yes, they will be unrecognized. There is flag to avoid that and our SQE
> is using it already: -XX:+IgnoreUnrecognizedVMOptions
>
> And we [re]moved flags which should not be used by general public, they
> are our internal flags.
Well I didn't catalog all those changed but you know that the above is
not true in general. -XX flags are used a lot in places they
"shouldn't". :( Hopefully the PD ones are less likely to be used.
Overall I don't understand the form of this change. I would expect all
the platform specific stuff to be in the hpp files included by the
shared cpp file. All these new cpp files seem somewhat redundant to me.
And what does an ARCH_PD_ flag mean? I couldn't see any examples of
them. Something different between x86-solaris and x86-linux for example?
And why do we bracket things with identical comments eg:
! /* all DECLARE_*_FLAG 's are defined in utilities/macros.hpp */
RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, ...
RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, ...
+ /* all DECLARE_*_FLAG 's are defined in utilities/macros.hpp */
David
-----
>
> Thanks,
> Vladimir
>
>>
>> David
>>
>> On 22/08/2012 7:23 AM, Christian Thalinger wrote:
>>> http://cr.openjdk.java.net/~twisti/6677625/
>>>
>>> 6677625: Move platform specific flags from globals.hpp to
>>> globals_<arch>.hpp
>>> Reviewed-by:
>>> Contributed-by: Tao Mao<tao.mao at oracle.com>
>>>
>>> Add new definition RUNTIME_PD_FLAGS and move platform specific flags
>>> from
>>> globals.hpp to globals_<arch>.hpp.
>>>
>>> src/cpu/sparc/vm/globals_sparc.cpp
>>> src/cpu/sparc/vm/globals_sparc.hpp
>>> src/cpu/x86/vm/globals_x86.cpp
>>> src/cpu/x86/vm/globals_x86.hpp
>>> src/cpu/zero/vm/globals_zero.cpp
>>> src/cpu/zero/vm/globals_zero.hpp
>>> src/share/vm/c1/c1_globals.hpp
>>> src/share/vm/opto/c2_globals.cpp
>>> src/share/vm/opto/c2_globals.hpp
>>> src/share/vm/opto/runtime.cpp
>>> src/share/vm/runtime/globals.cpp
>>> src/share/vm/runtime/globals_extension.hpp
>>> src/share/vm/runtime/globals.hpp
>>> src/share/vm/utilities/macros.hpp
>>>
More information about the hotspot-dev
mailing list