Profiling number of garbage-collected object instances per class

前端 未结 1 1424
走了就别回头了
走了就别回头了 2021-01-14 10:16

I am looking for a tool that can provide VisuaVM-like profiling about live objects, but in non-GUI mode.

The Visual VM functionality I am referring, is accessed by g

相关标签:
1条回答
  • 2021-01-14 10:48

    I think Class Histograms are what you look for. You could collect the histograms in regular intervals and this will show you number of objects of each class and occupied space. You can then parse the text output yourself in order to:

    • compare two histograms to see instance allocation/deallocation
    • filter by a class name
    • monitor space occupation of class instances over time

    Collect class histogram with jmap -histo $pid.

    0 讨论(0)
提交回复
热议问题