如何知道我的应用程序运行时期间是否运行了垃圾收集器? [英] How to know if Garbage Collector was run during my application runtime?
本文介绍了如何知道我的应用程序运行时期间是否运行了垃圾收集器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们有什么方法可以确定Java垃圾收集器是否在应用程序运行时运行?
Is there any way through which we can find out if Java Garbage Collector was run during an application's run time?
Paul
推荐答案
您可以使用JVM参数 -verbose:gc
和 -XX:+ PrintGCDetails
查看GC正在做什么。请参阅 http://www.oracle的第3.2节。 com / technetwork / java / gc-tuning-5-138395.html
You can use JVM arguments -verbose:gc
and -XX:+PrintGCDetails
to see what the GC is doing. Take a look at section 3.2 of http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html
这篇关于如何知道我的应用程序运行时期间是否运行了垃圾收集器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文