Pls review 6173675/7003271
Paul Hohensee
paul.hohensee at oracle.com
Tue Jan 4 13:00:30 PST 2011
These two rfes implement per-thread approximate memory allocation tracking.
6173675 also adds multi-thread-id versions of getThreadCpuTime and
getThreadUserTime.
*6173675 M&M: approximate memory allocation rate/amount per thread
<http://monaco.sfbay.sun.com/detail.jsf?cr=6173675>
**7003271 Hotspot should track cumulative Java heap bytes allocated on a
per-thread basis <http://monaco.sfbay.sun.com/detail.jsf?cr=7003271>
*6173675 is the library part, while 7003271 is the Hotspot part.
Webrevs here
http://cr.openjdk.java.net/~phh/6173675/webrev.00/
http://cr.openjdk.java.net/~phh/7003271/webrev.00/
The new file jdk/src/share/classes/com/sun/management/ThreadMXBean.java
defines
the com.sun.management.ThreadMXBean, a new interface subclassed from
java.lang.
management.ThreadMXBean. The Oracle implementation of ThreadMXBean now
implements c.s.m.ThreadMXBean rather than j.l.m.ThreadMXBean.
Hotspot has been changed to track the total amount of memory allocated
by each
thread on the Java heap. The total is approximate because it's
incremented only
when a TLAB (thread-local allocation buffer) is retired, or when an
object is allocated
directly in eden or the old generation. The implementation of
getThreadAllocatedBytes
attempts to include the memory allocated within the currently active
TLABs, but that's
precise only when the requesting thread is the same as the examined thread.
Some cleanup has been done in both ThreadImpl.java and Hotspot as a side
effect of
implementing this change.
Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20110104/508646f9/attachment.html
More information about the serviceability-dev
mailing list