I want to programatically capture the statistics of java application for all its objects present in heap and their usage.
My requirement is not to analyze the heap dump with MAT, but dynamically take snapshot after every specified period with a breakdown of heap usage by each object present in heap.
Can anybody suggest me any existing APIs if available, over which I can write a wrapper to implement the idea.