[9] RFR(M): 8129847: Compiling methods generated by Nashorn triggers high memory usage in C2

Zoltán Majó zoltan.majo at oracle.com
Thu Nov 26 14:03:42 UTC 2015

Hi Vladimir,

On 11/26/2015 02:50 PM, Vladimir Ivanov wrote:
>> So I would like to first get this version in and see if we get problems
>> (bugs or regressions). If all looks fine, we can think of enabling
>> PhaseRenumberLive at other places as well (not necessarily all 6 from
>> above, only those that bring good benefits for a reasonable cost).
> Sounds good. Reviewed.

thank you for the review!

> I'd like to note that PhaseRemoveUseless & PhaseIterGVN are performed 
> too frequently right now (that's what JDK-8059241 is about). So, I'd 
> experiment with something similar to iterative loop optimization pass 
> in Compile::inline_incrementally:
>     if (live_nodes() > (uint)LiveNodeCountInliningCutoff) {
>       if (low_live_nodes < (uint)LiveNodeCountInliningCutoff * 8 / 10) {
>         TracePhase tp("incrementalInline_ideal", 
> &timers[_t_incrInline_ideal]);
>         // PhaseIdealLoop is expensive so we only try it once we are
>         // out of live nodes and we only try it again if the previous
>         // helped got the number of nodes down significantly
>         PhaseIdealLoop ideal_loop( igvn, false, true );
>         if (failing())  return;
>         low_live_nodes = live_nodes();
>         _major_progress = true;
>       }
>       if (live_nodes() > (uint)LiveNodeCountInliningCutoff) {
>         break;
>       }
>     }

Thank you for the suggestion and for drawing attention of JDK-8059241.

Does JDK-8059241 plan to add something similar? In that case I would 
wait for JDK-8059241 to be completed and then start experimenting with 
increasing the number of times a PhaseRenumberLive is performed.

If your suggestion is independent or JDK-8059241, then I would add it to 
the already existing RFE JDK-8143321: "Reduce the C2 compiler's memory 
usage". That RFE includes a number of suggestions on how to further 
reduce the C2 compiler's memory usage. We might split the RFE into 
different (sub-)tasks once it becomes clearer how to split up the the 
work into manageable chunks.

Thank you and best regards,


> Best regards,
> Vladimir Ivanov

More information about the hotspot-compiler-dev mailing list