RFR: 8166002: Emulate client build on platforms with reduced virtual address space
Jamsheed C m
jamsheed.c.m at oracle.com
Tue Jan 10 04:32:02 UTC 2017
Hi Vladimir,
On 1/10/2017 12:57 AM, Vladimir Kozlov wrote:
> Hi, Jamsheed
>
> Why you set flags related to segmented codecache?
> NonProfiledCodeHeapSize, ProfiledCodeHeapSize, NonNMethodCodeHeapSize
i made setting more equivalent to c1_globals_XX.hpp non tiered settings.
>
> SegmentedCodeCache should be off in Client mode. SegmentedCodeCache
> setting is done in set_tiered_flags() which is called after you
> changed ReservedCodeCacheSize in set_client_compilation_mode() and
> will not be set to true.
Yeah.
>
> Unfortunately we can do nothing for CodeCacheSegmentSize which is 128
> bytes in tiered VM since it is constant in product VM.
Ok.
>
> I also forgot to tell that you should use FLAG_SET_ERGO() macro for
> flags settings in set_client_compilation_mode().
Ok.
Best Regards,
Jamsheed
>
> Thanks,
> Vladimir
>
> On 1/3/17 9:56 AM, Vladimir Kozlov wrote:
>> Good.
>>
>> Thanks,
>> Vladimir
>>
>> On 1/3/17 8:17 AM, Jamsheed C m wrote:
>>> Hi Vladimir,
>>>
>>> On 1/3/2017 11:15 AM, Vladimir Kozlov wrote:
>>>> Hi Jamsheed
>>>>
>>>> Why you moved set_client_compilation_mode() to c1_globals and new
>>>> class? Why not to keep it in compilerDefinitions?
>>>>
>>> Done.
>>>> selected_with_other_flags setting and code in
>>>> compilation_mode_selected() have the same checks - factor them into
>>>> one function.
>>> Done.
>>>>
>>>> I would suggest to keep comment in compilationPolicy.cpp.
>>> Done.
>>> revised webrev: http://cr.openjdk.java.net/~jcm/8166002/webrev.05/
>>>
>>> Best Regards,
>>> Jamsheed
>>>>
>>>> I reviewed CCC request.
>>>>
>>>> Thanks,
>>>> Vladimir
>>>>
>>>> On 1/2/17 8:25 PM, Jamsheed C m wrote:
>>>>> Hi Vladimir, Igor,
>>>>>
>>>>> i changed implementation a little bit(i.e now more close to -client
>>>>> behavior). Tests are modified to support this mode.
>>>>>
>>>>> http://cr.openjdk.java.net/~jcm/8166002/webrev.04/
>>>>>
>>>>>
>>>>> A new command-line option -XX:CompilationMode=<server/client> will
>>>>> be provided in JDK 9 to emulate a client build on
>>>>> 32-bit Windows platforms using a standard tiered build.
>>>>>
>>>>> -XX:CompilationMode=server--selects to build time compilation mode
>>>>> of server VM.
>>>>> -XX:CompilationMode=client--selects non-tiered c1 compiler. (Serial
>>>>> Garbage Collection in ON and Xshare is set to auto
>>>>> in this mode).
>>>>>
>>>>> This option is available only on Tiered build (i.e. Server VM).
>>>>> Client VM ignores this flag and continues with build time
>>>>> compilation mode.
>>>>>
>>>>> This option will have no effect if any of TieredCompilation,
>>>>> TieredStopAtLevel, UseAOT, EnableJVMCI, UseJVMCICompiler is
>>>>> specified at the command-line.
>>>>>
>>>>> Platforms except 32-bit Windows runs in server compilation mode by
>>>>> default. 32-bit Windows runs in client compilation
>>>>> mode by default. The user should specify
>>>>> -XX:CompilationMode=<server/client> to switch.
>>>>>
>>>>> -XX:+/-TieredCompilation or -XX:TieredStopAtLevel=<0-4> or
>>>>> -XX:+/-UseAOT or -XX:+/-EnableJVMCI or
>>>>> -XX:+/-UseJVMCICompiler always switch to build time compilation mode
>>>>> plus corresponding option behavior irrespective of
>>>>> CompilationMode option.
>>>>>
>>>>> I have updated the CCC request link in bug report, Please review.
>>>>>
>>>>> Best Regards,
>>>>> Jamsheed
>>>>>
>>>>> On 12/6/2016 12:22 AM, Vladimir Kozlov wrote:
>>>>>> On 12/5/16 6:21 AM, Jamsheed C m wrote:
>>>>>>> Hi Vladimir,
>>>>>>>
>>>>>>> On 12/3/2016 8:02 AM, Vladimir Kozlov wrote:
>>>>>>>> On 12/2/16 7:38 AM, Jamsheed C m wrote:
>>>>>>>>> Hi Vladimir, Igor,
>>>>>>>>>
>>>>>>>>> I made a few more changes to include the optimization that was
>>>>>>>>> available only on client.
>>>>>>>>>
>>>>>>>>> 1) a few c1 changes (JDK-7153771..)
>>>>>>>>
>>>>>>>> Which one?
>>>>>>> This one.
>>>>>>
>>>>>> I see.
>>>>>>
>>>>>> Thanks,
>>>>>> Vladimir
>>>>>>
>>>>>>> src/share/vm/c1/c1_Compilation.hpp
>>>>>>>
>>>>>>> // will compilation make optimistic assumptions that might
>>>>>>> lead to
>>>>>>> // deoptimization and that the runtime will account for?
>>>>>>> bool is_optimistic() const {
>>>>>>> - return !TieredCompilation &&
>>>>>>> + return is_client_compilation_mode_vm() &&
>>>>>>> (RangeCheckElimination || UseLoopInvariantCodeMotion) &&
>>>>>>> method()->method_data()->trap_count(Deoptimization::Reason_none)
>>>>>>> == 0;
>>>>>>> }
>>>>>>>
>>>>>>> src/share/vm/c1/c1_Runtime1.cpp
>>>>>>> - assert(!TieredCompilation, "incompatible with tiered
>>>>>>> compilation");
>>>>>>> + assert(is_client_compilation_mode_vm(), "incompatible in non
>>>>>>> client modes");
>>>>>>>
>>>>>>> mpegaudio was about 6% low without this.
>>>>>>>
>>>>>>>>>
>>>>>>>>> 2) Made SerialGC as default GC.
>>>>>>>>
>>>>>>>> Should be only for client_compilation_mode
>>>>>>> Ok.
>>>>>>>>
>>>>>>>>>
>>>>>>>>> 3) Set CICompileCount=1 for client compilation mode.
>>>>>>>>
>>>>>>>> I think check should be is_client_compilation_mode_vm()
>>>>>>> Ok.
>>>>>>> Best Regards,
>>>>>>> Jamsheed
>>>>>>>>
>>>>>>>>>
>>>>>>>>> 4) Tuned thresholds to get better performance.
>>>>>>>>
>>>>>>>> ok
>>>>>>>>
>>>>>>>>>
>>>>>>>>> 5) Added relevant flags in few tests, modified
>>>>>>>>> TestSelectDefaultGC.java.
>>>>>>>>
>>>>>>>> ok
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Vladimir
>>>>>>>>
>>>>>>>>>
>>>>>>>>> revised webrev:
>>>>>>>>> http://cr.openjdk.java.net/~jcm/8166002/webrev.03/
>>>>>>>>>
>>>>>>>>> performance report is added in bug report.
>>>>>>>>>
>>>>>>>>> Best Regards,
>>>>>>>>>
>>>>>>>>> Jamsheed
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 11/1/2016 1:14 AM, Vladimir Kozlov wrote:
>>>>>>>>>> webrev.02 looks good to me too.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Vladimri
>>>>>>>>>>
>>>>>>>>>> On 10/31/16 10:39 AM, Igor Veresov wrote:
>>>>>>>>>>> Jamsheed explained to me that ReservedCodeCacheSize is now set
>>>>>>>>>>> in the else clause (udiffs are not showing the
>>>>>>>>>>> proper alignment and I missed it). The change looks good to me.
>>>>>>>>>>>
>>>>>>>>>>> igor
>>>>>>>>>>>
>>>>>>>>>>>> On Oct 31, 2016, at 9:42 AM, Igor Veresov
>>>>>>>>>>>> <igor.veresov at oracle.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Assuming it gets the performance/startup numbers close to the
>>>>>>>>>>>> client VM it looks fine.
>>>>>>>>>>>> But what about adjusting the code cache sizes? With tiered we
>>>>>>>>>>>> get 240M ReservedCodeCacheSize, which also turns
>>>>>>>>>>>> on SegmentedCodeCache. It seems like we won’t need the
>>>>>>>>>>>> “profiled” segment of the code
>>>>>>>>>>>> cache at all. It is also likely that we’d do fine with a
>>>>>>>>>>>> smaller overall code cache.
>>>>>>>>>>>>
>>>>>>>>>>>> igor
>>>>>>>>>>>>
>>>>>>>>>>>>> On Oct 31, 2016, at 9:14 AM, Jamsheed C m
>>>>>>>>>>>>> <jamsheed.c.m at oracle.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Vladimir, Igor,
>>>>>>>>>>>>>
>>>>>>>>>>>>> revised webrev:
>>>>>>>>>>>>> http://cr.openjdk.java.net/~jcm/8166002/webrev.02/
>>>>>>>>>>>>>
>>>>>>>>>>>>> i took flags from bug comment.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Igor V. suggested next flags setting to emulate Client VM
>>>>>>>>>>>>> compile threshold with TieredStopAtLevel=1:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Tier3BackEdgeThreshold=14000
>>>>>>>>>>>>> Tier3CompileThreshold=1500
>>>>>>>>>>>>> Tier3InvocationThreshold=1500
>>>>>>>>>>>>> Tier3MinInvocationThreshold =1500
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Jamsheed
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 10/28/2016 11:48 PM, Vladimir Kozlov wrote:
>>>>>>>>>>>>>> Add comment what the code does and why. Move the code into
>>>>>>>>>>>>>> separate function reaturning bool. And condition
>>>>>>>>>>>>>> CodeCache setting based on result. It will reduce #ifdef
>>>>>>>>>>>>>> mess.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Can you put && to the end of previous line? To get good
>>>>>>>>>>>>>> alignment.
>>>>>>>>>>>>>> Should we also change CompilationPolicyChoice?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Ask Igor Veresov to verify settings.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>> Vladimir
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 10/28/16 10:59 AM, Jamsheed C m wrote:
>>>>>>>>>>>>>>> Hi Vladimir,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> revised webrev with just ergo settings for win32.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://cr.openjdk.java.net/~jcm/8166002/webrev.01/
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Best Regards
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Jamsheed
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On 10/28/2016 12:25 PM, Vladimir Kozlov wrote:
>>>>>>>>>>>>>>>> Hi Jamsheed,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Why you need changes in tests?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Why you can't use set_client_compilation_mode() in both
>>>>>>>>>>>>>>>> places?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Looks fine otherwise.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>> Vladimir
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On 10/20/16 8:45 AM, Jamsheed C m wrote:
>>>>>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> bug id:https://bugs.openjdk.java.net/browse/JDK-8166002
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> http://cr.openjdk.java.net/~jcm/8166002/webrev.00/
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Fix: set NeverActAsServerClassMachine=true, Limit
>>>>>>>>>>>>>>>>> TieredCompilation to C1 by default, for win32 platform.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> A new flag CompilationMode=<client/server> is introduced
>>>>>>>>>>>>>>>>> to select server/ client mode compilation. This
>>>>>>>>>>>>>>>>> option is supported only in TIERED builds.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> -XX:CompilationMode=server supports both
>>>>>>>>>>>>>>>>> -XX:+/-TieredCompilation.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> -XX:CompilationMode:client ignores TieredCompilation
>>>>>>>>>>>>>>>>> flag.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Please review,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Jamsheed
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>
>>>
More information about the hotspot-compiler-dev
mailing list