Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
hprof,直方图按类显示对象的数量。
这是在 jvm 生命周期内分配的对象总数吗?
或者这是当前堆上的对象数量?
或者这是堆上当前可访问对象的数量?
这取决于。如果您使用“live”(例如jmap -histo:live PID)选项生成转储,则它是可访问对象的数量。在其他情况下,它是当前在堆上分配的对象数。
jmap -histo:live PID