This issue is limited to generations of HotSpot . Is there a way to programmatically find out in which generation a particular instance lives. Data such as:
- Young or old generation?
- If young, who survived?
- Inside TLAB? Which stream?
Any technique (e.g. BTrace , JVMTI ) works as long as I can do something like this:
Object x = new Object(); HotSpotGenerationInfo info = HotSpotGenerationUtil.getInfo(x);
Beggars cannot be elections, but ideally I could also find out when an instance of interest was moving from one generation to another at the time it occurred (i.e., based on an event callback - I was not interested in the delay and overhead implied in the survey. )
Not interested in answers that simply say no without justification :)
java garbage-collection jvm jvm-hotspot jvmti
Brian harris
source share