[8u-dev] Request for approval: Backport of 8011858

Zoltán Majó zoltan.majo at oracle.com
Tue Sep 15 13:54:02 UTC 2015

Hi Vladimir,

thank you for the feedback!

On 09/14/2015 06:00 PM, Vladimir Kozlov wrote:
> On 9/14/15 7:31 AM, Zoltán Majó wrote:
>> Hi,
>> I would like to request the backport of the fix for JDK-8011858 to 
>> 8u-dev. The fix can help reducing the memory usage of
>> the C2 compiler and is therefore needed to fix JDK-8129847.
>> Original (9) bug: https://bugs.openjdk.java.net/browse/JDK-8011858
>> Original changeset: 
>> http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/af60f1cb36f2
>> Unfortunately, the fix does not apply cleanly, as two affected files 
>> are different in 9 and in 8u-dev. Here are the
>> changes that I did not (could not) apply to the 8u-dev tree:
> Can you scan jdk8u C2 code for other cases where C->unique() is used 
> for stack. May be some were removed in jdk9. But we still need to fix 
> them.

I found two places where we can use live_nodes() instead of unique():
1) in matcher.cpp on line 345 for determining the stack size used in 
2) in compile.cpp on line 330 for the estimated worklist size.

I updated these source code locations accordingly.

These changes could be applied to 9 as well. Do we want to do that? If 
yes, I guess a good way to do it would be to file a separate 
bug/enhancment for 9. Or do you see some other way?
>> - http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/af60f1cb36f2#l6.8
>> - http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/af60f1cb36f2#l9.8
> node.cpp has next code in dump_nodes() which you should fix (I look on 
> jdk8u/jdk8u/hotspot code):

Thanks for catching that. I changed that code as well.

Here is the newest webrev:

All JPRT tests and all JTREG compiler tests (that pass with an 
unmodified VM) pass.

Thank you and best regards,


> GrowableArray <Node *> nstack(C->unique());
> Thanks,
> Vladimir
>> Webrev: http://cr.openjdk.java.net/~zmajo/8011858_8u/webrev.00/
>> Testing:
>> - the fix was pushed into 9 on Aug 11 and did not cause any nightly 
>> failures;
>> - all JPRT tests pass;
>> - all JTREG tests pass that pass with the unmodified VM.
>> Thank you and best regards,
>> Zoltan

More information about the hotspot-compiler-dev mailing list