HotSpot 17 merge

Andrew John Hughes ahughes at redhat.com
Mon May 17 09:58:42 PDT 2010


On 17 May 2010 12:44, Erik Trimble <erik.trimble at oracle.com> wrote:
> Andrew John Hughes wrote:
>>
>> On 16 May 2010 18:22, Andrew Haley <aph at redhat.com> wrote:
>>
>>>
>>> On 05/16/2010 05:14 PM, Andrew John Hughes wrote:
>>>
>>>>
>>>> The webrev is here:
>>>>
>>>> http://cr.openjdk.java.net/~andrew/jdk6-hs17-merge/
>>>>
>>>> I'd also like to revert:
>>>>
>>>> 6909480: Disable Escape Analysis in jdk 6u18
>>>> http://hg.openjdk.java.net/hsx/hsx16/master/rev/4ebd3f8407eb
>>>>
>>>> which isn't present in hs17 (and so remains a difference between jdk6
>>>> and hs17) as, unlike jdk6's version, hs17 is based on the main HotSpot
>>>> tree rather than the hs16 master.  I didn't include this in the merge
>>>> because it's clearer what's going on if it appears as a separate
>>>> change.
>>>>
>>>
>>> Ahh, good catch.
>>>
>>> Do we have any idea why escape analysis is disabled?
>>>
>>> Andrew.
>>>
>>>
>>
>> I assume it wasn't stable enough in hs16, but the bug isn't visible.
>> Can someone from the HotSpot team shed more light on this?
>>
>
> http://hg.openjdk.java.net/hsx/hsx17/master/rev/357d4e2eb4dd
>
> this changeset turns EA on.  It was putback at hs17-b01, so it's never been
> enabled in HS16 or before.
>

I didn't say it had, and I can see it's now false in c2_globals.  I'm
talking about an additional change which was added to the hs16 branch:

  if (DoEscapeAnalysis) {
    if (FLAG_IS_CMDLINE(DoEscapeAnalysis)) {
      warning("Escape Analysis is disabled in this release.");
    }
    FLAG_SET_DEFAULT(DoEscapeAnalysis, false);
  }

which prevents -XX:+DoEscapeAnalysis being used to enable it.

$ /home/andrew/build/icedtea6/bin/java -version
java version "1.6.0_19"
OpenJDK Runtime Environment (IcedTea6 1.9pre+r727bee274d9e) (Gentoo
build 1.6.0_19-b19)
OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode)

$ /home/andrew/build/icedtea6/bin/java -XX:+DoEscapeAnalysis HelloWorld
OpenJDK 64-Bit Server VM warning: Escape Analysis is disabled in this release.
Hello World!

This is not present in hs17 so I think it should be removed from
OpenJDK6 as part of the merge.
AFAICS, hs17 does turn on EscapeAnalysis as part of aggressive optimisations:

  if (AggressiveOpts) {
    // Switch on optimizations with AggressiveOpts.
    if (FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
      FLAG_SET_DEFAULT(DoEscapeAnalysis, true);
    }

but turns it off when InvokeDynamic is used (hardly relevant for OpenJDK6)

#ifdef COMPILER2
  if (EnableInvokeDynamic && DoEscapeAnalysis) {
    // TODO: We need to find rules for invokedynamic and EA.  For now,
    // simply disable EA by default.
    if (FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
      DoEscapeAnalysis = false;
    }
  }
#endif

It also allows the user to turn it on, whereas if we leave the change
from hs16 in OpenJDK6, that won't be possible in OpenJDK6:

$ /mnt/builder/jdk6/bin/java -version
openjdk version "1.6.0-internal"
OpenJDK Runtime Environment (build 1.6.0-internal-andrew_17_may_2010_17_45-b00)
OpenJDK 64-Bit Server VM (build 17.0-b13, mixed mode)

$ /mnt/builder/jdk6/bin/java -XX:+DoEscapeAnalysis HelloWorld
OpenJDK 64-Bit Server VM warning: Escape Analysis is disabled in this release.
Hello World!

Hence the request to reverse it and bring OpenJDK6's version closer to
the hs17 tree.

> EA was on for all of HS17 testing, and we've been working on it, but it's
> /just/ not quite production-ready, and the decision was made to not spend
> the effort to try and fix it in HS17. We're hoping to get it fully fixed in
> the current HS.
>
> --
> Erik Trimble
> Java System Support
> Mailstop:  usca22-123
> Phone:  x17195
> Santa Clara, CA
> Timezone: US/Pacific (GMT-0800)
>
>



-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8


More information about the jdk6-dev mailing list