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.
我计划迁移到 Java 8,然后我想检查我的项目中加载了多少类,更重要的是它们将占用多少空间,以便我可以相应地调整和配置元空间。
我知道我可以使用jstat来达到这个目的,但不确定我需要什么样的参数才能得到我想要的结果。
您应该使用一些 java profiler 工具。以下是其中的一些链接。 YourKit确实不错,但不是免费的。
使用 jdk 的 bin 中的 jconsole / jvisualvm。它更直观和信息丰富。