JDK 7 Features.
Paul.Hohensee at Sun.COM
Thu Mar 26 16:38:03 PDT 2009
As you note, it's available in 6u14, and is also available in 6u6p, the
performance release (for which see http://java.sun.com/performance).
It'll be on the feature list for 6u14, but it's off by default for now
it's pretty reliable, it's not yet reliable enough for us to turn make
it the default.
It does get turned on when you use -XX:+AggressiveOpts though.
Scalar replacement is actually an optimization enabled by something called
Escape Analysis, which latter finds all the objects that are used only
thread that allocated them. I.e., they don't 'escape' the thread that
them. Such objects are candidates for object explosion, which splits an
object up into its component fields and allocates them in registers (that's
what scalar replacement is) or on the thread stack (which we don't do yet
for various reasons, not least of which is that it's almost as fast to
in the heap as on the thread stack, and that the thread stack is rather
You're right that scalar replacement has the potential to make some code
faster, assuming there's enough registers available. AggressiveOpts is our
catchall flag for performance features that will eventually become the
Scalar replacement (and escape analysis) are on the list. Anyone want to
help us out? :)
Ismael Juma wrote:
> Hi all,
> I am happy to see an initial plan for JDK 7 that includes features,
> milestones and dates.
> Mark suggested in his blog entry, that follow-ups should be directed
> to this list. I suggest adding "Scalar replacement" as one of the new VM
> features. It's already available in JDK 6 Update 14, but not enabled by
> default (along with Compressed 64-bit object pointers and the G1
> collector). I believe it's a major new feature and it can have a
> substantial performance benefit.
>  http://blogs.sun.com/mr/entry/jdk7
More information about the jdk7-dev