EscapeAnalysis diagnostics + user-guided stack allocation

Vitaly Davidovich vitalyd at gmail.com
Mon Jan 16 22:11:21 PST 2012


Hi,

Is there a way, in product build, to get diagnostics on EA? For example, to
see which allocations in a method are removed? I realize EA is an
implementation detail and subject to change release to release, but it
would be a great option to have for performance tuning.  There are many
classes which are simple wrappers on top of a primitive (e.g. Apache's
HashCodeBuilder, EqualsBuilder) which people use, and if the allocations
are not removed, they create a lot of GC pressure.  In cases where EA does
not remove them, it would be advantageous to hand-code the functionality
instead of using these utility wrappers.  However, the only way to know
right now (to my knowledge) is to look at disassembly via hsdis -- it'd be
great if there was a simpler and quicker way to do that check.

Also, are there any plans to support struct/value-type like (ala CLR's
struct) constructs in the JVM (presumably java can then target it)? This
would allow developer to control where something gets allocated without
relying on EA, and it would also reduce the amount of indirection in object
graphs (and the mem/cpu performance hit of them) since struct members of a
heap allocated object could be allocated "inline".  Apologies if this
mailgroup isn't the most appropriate for this particular question, so feel
free to redirect me to the right one.

Thanks

-- 
Vitaly
617-548-7007 (mobile)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20120117/d5549a4e/attachment.html 


More information about the hotspot-compiler-dev mailing list