I have a long-running (multiple days) application with objects that I expect to stay around for varying lengths of time before they can be garbage collected. Let's say there's four categories:
- Very short-lived (<1s)
- Alive for the duration of user attention (1s < 18h)
- Daily data (~24h)
- 'Eternal' (very few, life of the application)
To help with tuning, I'd like to find a way of checking what actual data is getting in to the tenured generation, using the Java 6 Hotspot VM. Using jmap to generate HPROF files doesn't seem to include generational information. Is there another way of getting this information?