[concurrency-interest] @Contended (JEP-142)

Vitaly Davidovich vitalyd at gmail.com
Fri Nov 30 08:48:55 EST 2012

Right,  but I meant that the tool will report proper size but developer
looking at that number may not immediately understand why the reported size
is larger than expected if padding is applied.  If the tool can know that
@Contended is present, it can indicate that to the developer.  I'm not
familiar with the heap dump file format so don't know if there will be
enough info for the tool there.  I don't think instrumentation applies here
as the tool is interpreting a dump file and not profiling a live

Sent from my phone
On Nov 30, 2012 8:41 AM, "Aleksey Shipilev" <aleksey.shipilev at oracle.com>

> On 11/30/2012 05:36 PM, Vitaly Davidovich wrote:
> > What's the plan for making this info available in heap dumps (taken
> > using jmap)? I'd imagine tools like Eclipse MAT may want to indicate
> > that a given instance of a class has padding applied.  Otherwise, the
> > object size reported won't match expectation (without knowing that
> > padding was applied).
> Can't speak for other implementations, but HotSpot would report the
> proper sizes/offset via Instrumentation.objectSize and
> Unsafe.*fieldOffset. As long as tooling is not doing dumb
> "sum(fieldTypeCount*fieldSizeAsMandatedByJLS)", it should pick up the
> proper sizes.
> -Aleksey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20121130/197969ae/attachment.html>

More information about the Concurrency-interest mailing list