RFR: 8166002: Emulate client build on platforms with reduced virtual address space

Jamsheed C m jamsheed.c.m at oracle.com
Mon Dec 5 14:01:35 UTC 2016


Hi Igor,

On 12/4/2016 12:28 AM, Igor Veresov wrote:
> I really think you should consider creating a new compilation policy instead of hacking the existing tiered one.
> The easy way of doing that would be to subclass SimpleThresholdPolicy and override:
> 1. initialize() to setup the number of c1 threads to 1 and c2 threads to 0.
> 2. method_invocation_event and method_back_branch_event to handle level transitions.
>
> In the event handlers you would check method counters. You may emulate the old policy by triggering compiles when i + b > CompileThreshold.
> When a method is ready to compile you would call compile().
>
> I think a separate policy is easier because you won’t have to deal with the fact that the tiered policy is really design with having all these compilation levels in mind. For example you won’t have to set TieredStopAtLevel, etc.
>
> Also instead of is_client_compilation_mode_vm() I’d rather add a method the policy. For example “is_tiered_policy”, or simply check CompilerPolicy::policy()->compiler_count(CompLevel_full_optimization) == 0.
>
> What do you think?
I agree. Should i be using CompileThreshold or new flags 
Tier1CompileThreshold.. ?

Best Regards,
Jamsheed

>
> igor
>
>
>> On Dec 2, 2016, at 7:38 AM, Jamsheed C m <jamsheed.c.m at oracle.com> 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 ..)
>>
>> 2) Made SerialGC as default GC.
>> 3) Set CICompileCount=1 for client compilation mode.
>> 4) Tuned thresholds to get better performance.
>>
>> 5) Added relevant flags in few tests, modified TestSelectDefaultGC.java.
>>
>> 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