Hi again,<br><br>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.<br>

<br>Obviously this is far from ideal on many fronts and I'm not sure it would produce good results.<br><br><div class="gmail_quote">On Mon, Dec 20, 2010 at 12:02 PM, Brian Harris <span dir="ltr"><<a href="mailto:harribri@morganstanley.com">harribri@morganstanley.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello,<br><br>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. <br>



<br>These use cases illustrate what I had in mind:<br>  * JUnit test asserting >90% of allocations of type com.mycompany.Entity are done in TLAB<br>  * Benchmark tool showing the effect that various JVM tuning parameters have on memory management. Displayed as graphs, timelines, etc.<br>



<br>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?.<br><br>Happy holidays,<br><font color="#888888">Brian Harris<br>



</font></blockquote></div><br>