You can enable memory tracking with:
-XX:NativeMemoryTracking=mode, where mode is one of
- off - Instructs not to track JVM native memory usage. This is the default behavior if you don’t specify the -XX:NativeMemoryTracking option.
- summary - Tracks memory usage only by JVM subsystems, such as Java heap, class, code, and thread.
- detail - In addition to tracking memory usage by JVM subsystems, track memory usage by individual CallSite, individual virtual memory region and its committed regions.
Will enable memory tracking with a summary mode:
The Native Memory Tracking (NMT) is a Java HotSpot VM feature that tracks internal memory usage for a Java HotSpot VM. For details about NMT scope, how to enable NMT, and other additional usage details, see Native Memory Tracking. Since NMT doesn't track memory allocations by non-JVM code, you may have to use tools supported by the operating system to detect memory leaks in native code. The following sections describe how to monitor VM internal memory allocations and diagnose VM memory leaks.
Disabled by default
TODO link -Xloggc:gc
If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.
Edit your Comment