Pls review 6173675/7003271
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
*6173675 M&M: approximate memory allocation rate/amount per thread
**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.
The new file jdk/src/share/classes/com/sun/management/ThreadMXBean.java
the com.sun.management.ThreadMXBean, a new interface subclassed from
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
thread on the Java heap. The total is approximate because it's
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
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
implementing this change.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-dev