accessing memory management details

Y. Srinivas Ramakrishna y.s.ramakrishna at
Fri Jan 7 20:12:39 UTC 2011

These are most easily/conveniently done inside the JVM rather than
via the use of Reference queues etc. But even then the overheads
for tracking these things can add up, so you may be better off
instrumenting them directly into the JVM (or perhaps having Dtrace hooks
or like at strategic points which could then be leveraged suitably)
and which would hopefully not impose too much additonal overhead when
not enabled (and a facility to enable it on-the-fly/on-demand).

Features like this have been discussed a number of times in the
last few years, but have apparently not happened because of the
non-trivial overheads that one does not want in production JVM's.

-- ramki

On 1/5/2011 8:47 AM, Brian Harris wrote:
> Hi again,
> An idea has come to mind which may allow rough estimates for some of these
> figures. Instrumentation could be used as a hook to register phantom
> references of all newly allocated objects with a reference queue. Verbose GC
> logs could also be captured and parsed, and the GC timestamps could be fuzzy
> matched with the reference enqueue timestamps. Which GC run claimed which
> object could(?) then be roughly inferred.
> Obviously this is far from ideal on many fronts and I'm not sure it would
> produce good results.
> On Mon, Dec 20, 2010 at 12:02 PM, Brian Harris
> <harribri at>wrote:
>> Hello,
>> Is it possible for my app to learn where objects are allocated? Young or
>> old generation, if young which survivor space? In a LAB? I'm interested in
>> where an object was initially allocated, but also any movements (from
>> where?, to where?, when?) that happen thereafter.
>> These use cases illustrate what I had in mind:
>>    * JUnit test asserting>90% of allocations of type com.mycompany.Entity
>> are done in TLAB
>>    * Benchmark tool showing the effect that various JVM tuning parameters
>> have on memory management. Displayed as graphs, timelines, etc.
>> I looked through the 1.6 JVMTI demos and didn't see these sort of details
>> being exposed. Also nothing similar looking through BTrace examples. Where
>> should I look next?.
>> Happy holidays,
>> Brian Harris
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at

hotspot-gc-use mailing list
hotspot-gc-use at

More information about the hotspot-gc-dev mailing list