jmap的bug

这个版本的jdk在执行jmap时居然将旧生代的百分比算成了负数。

$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)


$ jmap -heap 15903
Attaching to process ID 15903, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.45-b02

using parallel threads in the new generation.
using thread-local object allocation.
Concurrent Mark-Sweep GC

Heap Configuration:
   MinHeapFreeRatio         = 40
   MaxHeapFreeRatio         = 70
   MaxHeapSize              = 3221225472 (3072.0MB)
   NewSize                  = 348913664 (332.75MB)
   MaxNewSize               = 348913664 (332.75MB)
   OldSize                  = 2872311808 (2739.25MB)
   NewRatio                 = 2
   SurvivorRatio            = 8
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 17592186044415 MB
   G1HeapRegionSize         = 0 (0.0MB)

Heap Usage:
New Generation (Eden + 1 Survivor Space):
   capacity = 314048512 (299.5MB)
   used     = 242824544 (231.57553100585938MB)
   free     = 71223968 (67.92446899414062MB)
   77.32071152115505% used
Eden Space:
   capacity = 279183360 (266.25MB)
   used     = 207959392 (198.32553100585938MB)
   free     = 71223968 (67.92446899414062MB)
   74.48846234961854% used
From Space:
   capacity = 34865152 (33.25MB)
   used     = 34865152 (33.25MB)
   free     = 0 (0.0MB)
   100.0% used
To Space:
   capacity = 34865152 (33.25MB)
   used     = 0 (0.0MB)
   free     = 34865152 (33.25MB)
   0.0% used
concurrent mark-sweep generation:
   capacity = 2872311808 (2739.25MB)
   used     = 17503507292142 MB
   free     = 92986414215918728 (8.86787550124347E10MB)
   -3.237336945265481E9% used

2 thoughts on “jmap的bug

Leave a Reply

Your email address will not be published. Required fields are marked *