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.
我正在使用 G1GC。
有没有我可以传递给 jvm 的 jvm 参数,所以每次发生 Humongous 分配时我都会得到一个 gc 日志?
-XX:+UnlockDiagnosticVMOptions -XX:+G1PrintHeapRegions
在每个巨大的分配上,这将发出G1HR ALLOC(StartsH)或G1HR ALLOC(SingleH)排列。注意:此选项将导致更多的调试信息打印到 GC 日志或控制台。
G1HR ALLOC(StartsH)
G1HR ALLOC(SingleH)