RFR 8012371: Adjust Tiered compile threshold according to available space in codecache

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu May 16 10:14:14 PDT 2013


On 5/16/13 8:41 AM, Albert Noll wrote:
> Hi,
>
> Thanks again for looking at the code. I made the proposed changes.
>
> http://cr.openjdk.java.net/~anoll/8012371/webrev.02/

This is good.

> I also thought about adding:
>
> if (CodeCache::needs_flushing()) {
>    return Double.MAX_VALUE;
> }

As Igor pointed it could be temporary state so we should not do that.

Also compileBroker does that check before creating compile task:

   if (!should_compile_new_jobs() || (UseCodeCacheFlushing && CodeCache::needs_flushing())) {
     CompilationPolicy::policy()->delay_compilation(method());
     return NULL;
   }

Thanks,
Vladimir

>
> Before:
>
> // Increase C1 compile threshold when the code cache is filled more
> // than specified by IncreaseFirstTierCompileThresholdAt percentage.
> // The main intention is to keep enough free space for C2 compiled code
> // to achieve peak performance if the code cache is under stress.
> if ((TieredStopAtLevel == CompLevel_full_optimization) && (level != CompLevel_full_optimization))  {
>    double current_reverse_free_ratio = CodeCache::reverse_free_ratio();
>    if (current_reverse_free_ratio > _increase_threshold_at_ratio) {
>      k *= exp(current_reverse_free_ratio - _increase_threshold_at_ratio);
>    }
> }
>
>
> What do you think?
>
> Thanks for looking again :-)
>
> Albert
>
> On 16.05.2013 04:44, Igor Veresov wrote:
>> Sure :)
>>
>> igor
>>
>> On May 15, 2013, at 2:34 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>>
>>> On 5/15/13 1:32 PM, Igor Veresov wrote:
>>>> Well, there is a Tier23InlineeNotifyFreqLog option there already.. :)
>>> I did not know about that flag but I still would like to use FirstTier.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>>> But I'm not insisting. Hopefully not too many people will have to tweak any of that.
>>>>
>>>> igor
>>>>
>>>> On May 15, 2013, at 11:02 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>>>>
>>>>> Tier23 could be confusing - we don't have 23 levels of tier :)
>>>>> That is why I thought FirstTier is more general name for Tier1, Tier2, Tier3.
>>>>>
>>>>> Vladimir
>>>>>
>>>>> On 5/15/13 9:53 AM, Igor Veresov wrote:
>>>>>> May I also comment about that option name?
>>>>>> Most tier-specific options in are in the form of TierXFooBar, where X is a compilation level(s). So, may be
>>>>>> IncreaseTier23CompileThresholdAt?
>>>>>>
>>>>>> igor
>>>>>>
>>>>>> On May 15, 2013, at 9:04 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>>>>>>
>>>>>>> IncreaseFirstTierCompileThresholdAt
>


More information about the hotspot-compiler-dev mailing list