Java入门之了解JVM(39)

Metaspace used 3207K, capacity 4496K, committed 4864K, reserved 1056768K

class space used 348K, capacity 388K, committed 512K, reserved 1048576K

?

*/

?

// 可以看出不同的GC打印的日志是不同的,因为GC有各自的日志实现,但java9中已经对日志进行的统一,可以使用-Xlog新参数设置,可以看到下面已经提示使用-Xlog:gc了

?

/** jdk1.9 新特性:将G1垃圾收集器设置为默认收集

[0.004s][warning][gc] -XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.

[0.064s][info ][gc,heap] Heap region size: 1M

[0.075s][info ][gc ] Using G1

[0.075s][info ][gc,heap,coops] Heap address: 0x0000000086800000, size: 1944 MB, Compressed Oops mode: 32-bit

推荐阅读