Introduction
HotStat, Display the diff of jstat -J-Djstat.showUnsupported=true -snap [pid]
Details
wget https://hatter-source-code.googlecode.com/svn/trunk/hotstat/hotstatall.jar
Usage:
Usage:
java -jar hotstatall.jar [options] [<PID> [<interval> [<count>]]]
Sample:
$ java -jar hotstatall.jar 1052 5000 3
---- hotstat diff ----
java.ci.totalTime = 30567087590
java.cls.loadedClasses = 9358
java.cls.sharedLoadedClasses = 0
java.cls.sharedUnloadedClasses = 0
java.cls.unloadedClasses = 0
java.property.java.class.path = /Users/hatterjiang/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
java.property.java.endorsed.dirs = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/endorsed
java.property.java.ext.dirs = /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext
java.property.java.home = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
java.property.java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
java.property.java.version = 1.6.0_31
java.property.java.vm.info = mixed mode
java.property.java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.property.java.vm.specification.name = Java Virtual Machine Specification
java.property.java.vm.specification.vendor = Sun Microsystems Inc.
java.property.java.vm.specification.version = 1.0
java.property.java.vm.vendor = Apple Inc.
java.property.java.vm.version = 20.6-b01-415
java.rt.vmArgs = -Dosgi.requiredJavaVersion=1.5 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xms40m -Xmx384m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
java.rt.vmFlags =
java.threads.daemon = 12
java.threads.live = 18
java.threads.livePeak = 23
java.threads.started = 84
sun.ci.compilerThread.0.compiles = 788
sun.ci.compilerThread.0.method =
sun.ci.compilerThread.0.time = 207114
sun.ci.compilerThread.0.type = 1
sun.ci.compilerThread.1.compiles = 706
sun.ci.compilerThread.1.method =
sun.ci.compilerThread.1.time = 193632
sun.ci.compilerThread.1.type = 1
sun.ci.lastFailedMethod = org/eclipse/ui/internal/views/markers/Markers groupMarkerEntries
sun.ci.lastFailedType = 2
sun.ci.lastInvalidatedMethod =
sun.ci.lastInvalidatedType = 0
sun.ci.lastMethod = org/eclipse/swt/widgets/Display observerProc
sun.ci.lastSize = 50
sun.ci.lastType = 1
sun.ci.nmethodCodeSize = 3077088
sun.ci.nmethodSize = 6288584
sun.ci.osrBytes = 51877
sun.ci.osrCompiles = 76
sun.ci.osrTime = 2142345954
sun.ci.standardBytes = 558729
sun.ci.standardCompiles = 1417
sun.ci.standardTime = 28424741636
sun.ci.threads = 2
sun.ci.totalBailouts = 1
sun.ci.totalCompiles = 1493
sun.ci.totalInvalidates = 0
sun.cls.appClassBytes = 36861892
sun.cls.appClassLoadCount = 13679
sun.cls.appClassLoadTime = 15911608415
sun.cls.appClassLoadTime.self = 6864938386
sun.cls.classInitTime = 1541491293
sun.cls.classInitTime.self = 834759859
sun.cls.classLinkedTime = 15238676883
sun.cls.classLinkedTime.self = 191037634
sun.cls.classVerifyTime = 15054009835
sun.cls.classVerifyTime.self = 1987579073
sun.cls.defineAppClassTime = 2613610555
sun.cls.defineAppClassTime.self = 175843102
sun.cls.defineAppClasses = 8096
sun.cls.initializedClasses = 6952
sun.cls.isUnsyncloadClassSet = 0
sun.cls.jniDefineClassNoLockCalls = 0
sun.cls.jvmDefineClassNoLockCalls = 18
sun.cls.jvmFindLoadedClassNoLockCalls = 0
sun.cls.linkedClasses = 8051
sun.cls.loadInstanceClassFailRate = 0
sun.cls.loadedBytes = 21919192
sun.cls.lookupSysClassTime = 85021783
sun.cls.methodBytes = 13399696
sun.cls.nonSystemLoaderLockContentionRate = 9
sun.cls.parseClassTime = 2609312124
sun.cls.parseClassTime.self = 1934665859
sun.cls.sharedClassLoadTime = 241168
sun.cls.sharedLoadedBytes = 0
sun.cls.sharedUnloadedBytes = 0
sun.cls.sysClassBytes = 3784976
sun.cls.sysClassLoadTime = 236864627
sun.cls.systemLoaderLockContentionRate = 0
sun.cls.time = 18770502861
sun.cls.unloadedBytes = 0
sun.cls.unsafeDefineClassCalls = 18
sun.cls.verifiedClasses = 8051
sun.gc.cause = No GC
sun.gc.collector.0.invocations = 131
sun.gc.collector.0.lastEntryTime = 430130784650
sun.gc.collector.0.lastExitTime = 430142405906
sun.gc.collector.0.name = PCopy
sun.gc.collector.0.time = 1805367252
sun.gc.collector.1.invocations = 12
sun.gc.collector.1.lastEntryTime = 203627910990
sun.gc.collector.1.lastExitTime = 203632982847
sun.gc.collector.1.name = CMS
sun.gc.collector.1.time = 46651366
sun.gc.generation.0.agetable.bytes.00 = 0
sun.gc.generation.0.agetable.bytes.01 = 1741928
sun.gc.generation.0.agetable.bytes.02 = 334192
sun.gc.generation.0.agetable.bytes.03 = 0
sun.gc.generation.0.agetable.bytes.04 = 0
sun.gc.generation.0.agetable.bytes.05 = 0
sun.gc.generation.0.agetable.bytes.06 = 0
sun.gc.generation.0.agetable.bytes.07 = 0
sun.gc.generation.0.agetable.bytes.08 = 0
sun.gc.generation.0.agetable.bytes.09 = 0
sun.gc.generation.0.agetable.bytes.10 = 0
sun.gc.generation.0.agetable.bytes.11 = 0
sun.gc.generation.0.agetable.bytes.12 = 0
sun.gc.generation.0.agetable.bytes.13 = 0
sun.gc.generation.0.agetable.bytes.14 = 0
sun.gc.generation.0.agetable.bytes.15 = 0
sun.gc.generation.0.agetable.size = 16
sun.gc.generation.0.capacity = 21757952
sun.gc.generation.0.maxCapacity = 43581440
sun.gc.generation.0.minCapacity = 21757952
sun.gc.generation.0.name = new
sun.gc.generation.0.space.0.capacity = 17432576
sun.gc.generation.0.space.0.initCapacity = 0
sun.gc.generation.0.space.0.maxCapacity = 34930688
sun.gc.generation.0.space.0.name = eden
sun.gc.generation.0.space.0.used = 1815048
sun.gc.generation.0.space.1.capacity = 2162688
sun.gc.generation.0.space.1.initCapacity = 0
sun.gc.generation.0.space.1.maxCapacity = 4325376
sun.gc.generation.0.space.1.name = s0
sun.gc.generation.0.space.1.used = 0
sun.gc.generation.0.space.2.capacity = 2162688
sun.gc.generation.0.space.2.initCapacity = 0
sun.gc.generation.0.space.2.maxCapacity = 4325376
sun.gc.generation.0.space.2.name = s1
sun.gc.generation.0.space.2.used = 2162688
sun.gc.generation.0.spaces = 3
sun.gc.generation.0.threads = 2
sun.gc.generation.1.capacity = 275189760
sun.gc.generation.1.maxCapacity = 359071744
sun.gc.generation.1.minCapacity = 20185088
sun.gc.generation.1.name = old
sun.gc.generation.1.space.0.capacity = 275189760
sun.gc.generation.1.space.0.initCapacity = 20185088
sun.gc.generation.1.space.0.maxCapacity = 359071744
sun.gc.generation.1.space.0.name = old
sun.gc.generation.1.space.0.used = 187550376
sun.gc.generation.1.spaces = 1
sun.gc.generation.2.capacity = 116682752
sun.gc.generation.2.maxCapacity = 268435456
sun.gc.generation.2.minCapacity = 21757952
sun.gc.generation.2.name = perm
sun.gc.generation.2.space.0.capacity = 116682752
sun.gc.generation.2.space.0.initCapacity = 21757952
sun.gc.generation.2.space.0.maxCapacity = 268435456
sun.gc.generation.2.space.0.name = perm
sun.gc.generation.2.space.0.used = 77325552
sun.gc.generation.2.spaces = 1
sun.gc.lastCause = unknown GCCause
sun.gc.policy.collectors = 2
sun.gc.policy.desiredSurvivorSize = 1081344
sun.gc.policy.generations = 3
sun.gc.policy.maxTenuringThreshold = 4
sun.gc.policy.name = ParNew:CMS
sun.gc.policy.tenuringThreshold = 1
sun.gc.tlab.alloc = 1757439
sun.gc.tlab.allocThreads = 8
sun.gc.tlab.fastWaste = 0
sun.gc.tlab.fills = 1273
sun.gc.tlab.gcWaste = 19002
sun.gc.tlab.maxFastWaste = 0
sun.gc.tlab.maxFills = 1104
sun.gc.tlab.maxGcWaste = 13443
sun.gc.tlab.maxSlowAlloc = 528
sun.gc.tlab.maxSlowWaste = 8505
sun.gc.tlab.slowAlloc = 532
sun.gc.tlab.slowWaste = 9665
sun.os.hrt.frequency = 1000000000
sun.os.hrt.ticks = 484198490293
sun.perfdata.majorVersion = 2
sun.perfdata.minorVersion = 0
sun.perfdata.overflow = 0
sun.perfdata.size = 32768
sun.perfdata.timestamp = 77633699
sun.perfdata.used = 15416
sun.property.sun.boot.class.path = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/sunrsasign.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar
sun.property.sun.boot.library.path = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries
sun.rt._sync_ContendedLockAttempts = 1401
sun.rt._sync_Deflations = 621
sun.rt._sync_EmptyNotifications = 0
sun.rt._sync_FailedSpins = 0
sun.rt._sync_FutileWakeups = 218
sun.rt._sync_Inflations = 633
sun.rt._sync_MonExtant = 640
sun.rt._sync_MonInCirculation = 0
sun.rt._sync_MonScavenged = 0
sun.rt._sync_Notifications = 991
sun.rt._sync_Parks = 2343
sun.rt._sync_PrivateA = 0
sun.rt._sync_PrivateB = 0
sun.rt._sync_SlowEnter = 0
sun.rt._sync_SlowExit = 0
sun.rt._sync_SlowNotify = 0
sun.rt._sync_SlowNotifyAll = 0
sun.rt._sync_SuccessfulSpins = 0
sun.rt.applicationTime = 456912769442
sun.rt.createVmBeginTime = 1341532886608
sun.rt.createVmEndTime = 1341532886685
sun.rt.internalVersion = Java HotSpot(TM) 64-Bit Server VM (20.6-b01-415) for macosx-amd64 JRE (1.6.0), built on Apr 9 2012 12:12:18 by "root" with gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6)
sun.rt.interruptedBeforeIO = 0
sun.rt.interruptedDuringIO = 0
sun.rt.javaCommand =
sun.rt.jvmCapabilities = 1000000000000000000000000000000000000000000000000000000000000000
sun.rt.jvmVersion = 335937537
sun.rt.safepointSyncTime = 361269079
sun.rt.safepointTime = 2341686153
sun.rt.safepoints = 1148
sun.rt.threadInterruptSignaled = 0
sun.rt.vmInitDoneTime = 1341532886668
sun.threads.vmOperationTime = 1885872227
---- hotstat diff ----
java.ci.totalTime = [30567087590 >>>> 30841927257 (+274,839,667)]
sun.ci.compilerThread.0.compiles = [788 >>>> 790 (+2)]
sun.ci.compilerThread.0.time = [207114 >>>> 207755 (+641)]
sun.ci.compilerThread.1.compiles = [706 >>>> 707 (+1)]
sun.ci.compilerThread.1.time = [193632 >>>> 194118 (+486)]
sun.ci.lastMethod = [org/eclipse/swt/widgets/Display observerProc >>>> org/eclipse/swt/graphics/TextLayout draw]
sun.ci.lastSize = [50 >>>> 3774 (+3,724)]
sun.ci.nmethodCodeSize = [3077088 >>>> 3102784 (+25,696)]
sun.ci.nmethodSize = [6288584 >>>> 6353744 (+65,160)]
sun.ci.standardBytes = [558729 >>>> 563644 (+4,915)]
sun.ci.standardCompiles = [1417 >>>> 1420 (+3)]
sun.ci.standardTime = [28424741636 >>>> 28699581303 (+274,839,667)]
sun.ci.totalCompiles = [1493 >>>> 1496 (+3)]
sun.cls.appClassLoadCount = [13679 >>>> 13680 (+1)]
sun.cls.appClassLoadTime = [15911608415 >>>> 15911629404 (+20,989)]
sun.cls.appClassLoadTime.self = [6864938386 >>>> 6864959235 (+20,849)]
sun.cls.lookupSysClassTime = [85021783 >>>> 85036563 (+14,780)]
sun.cls.sharedClassLoadTime = [241168 >>>> 241671 (+503)]
sun.cls.sysClassLoadTime = [236864627 >>>> 236883522 (+18,895)]
sun.cls.time = [18770502861 >>>> 18770538194 (+35,333)]
sun.gc.generation.0.space.0.used = [1815048 >>>> 2302096 (+487,048)]
sun.gc.generation.2.space.0.used = [77325552 >>>> 77325808 (+256)]
sun.os.hrt.ticks = [484198490293 >>>> 489311690365 (+5,113,200,072)]
---- hotstat diff ----
java.ci.totalTime = [30841927257 >>>> 30846900237 (+4,972,980)]
java.cls.loadedClasses = [9358 >>>> 9360 (+2)]
sun.ci.compilerThread.0.compiles = [790 >>>> 791 (+1)]
sun.ci.compilerThread.0.time = [207755 >>>> 207981 (+226)]
sun.ci.compilerThread.1.compiles = [707 >>>> 708 (+1)]
sun.ci.compilerThread.1.time = [194118 >>>> 194366 (+248)]
sun.ci.lastMethod = [org/eclipse/swt/graphics/TextLayout draw >>>> org/eclipse/swt/widgets/Display removeContext]
sun.ci.lastSize = [3774 >>>> 69 (-3,705)]
sun.ci.nmethodCodeSize = [3102784 >>>> 3103520 (+736)]
sun.ci.nmethodSize = [6353744 >>>> 6354944 (+1,200)]
sun.ci.standardBytes = [563644 >>>> 563745 (+101)]
sun.ci.standardCompiles = [1420 >>>> 1422 (+2)]
sun.ci.standardTime = [28699581303 >>>> 28704554283 (+4,972,980)]
sun.ci.totalCompiles = [1496 >>>> 1498 (+2)]
sun.cls.appClassBytes = [36861892 >>>> 36866644 (+4,752)]
sun.cls.appClassLoadCount = [13680 >>>> 13683 (+3)]
sun.cls.appClassLoadTime = [15911629404 >>>> 15912469419 (+840,015)]
sun.cls.appClassLoadTime.self = [6864959235 >>>> 6865354077 (+394,842)]
sun.cls.defineAppClassTime = [2613610555 >>>> 2614054939 (+444,384)]
sun.cls.defineAppClassTime.self = [175843102 >>>> 175867678 (+24,576)]
sun.cls.defineAppClasses = [8096 >>>> 8098 (+2)]
sun.cls.loadedBytes = [21919192 >>>> 21922944 (+3,752)]
sun.cls.methodBytes = [13399696 >>>> 13401328 (+1,632)]
sun.cls.parseClassTime = [2609312124 >>>> 2609731597 (+419,473)]
sun.cls.parseClassTime.self = [1934665859 >>>> 1935084958 (+419,099)]
sun.cls.time = [18770538194 >>>> 18771376711 (+838,517)]
sun.gc.generation.0.space.0.used = [2302096 >>>> 5054920 (+2,752,824)]
sun.gc.generation.2.space.0.used = [77325808 >>>> 77336168 (+10,360)]
sun.os.hrt.ticks = [489311690365 >>>> 494329696243 (+5,018,005,878)]
sun.rt._sync_ContendedLockAttempts = [1401 >>>> 1405 (+4)]
sun.rt._sync_Deflations = [621 >>>> 624 (+3)]
sun.rt._sync_FutileWakeups = [218 >>>> 219 (+1)]
sun.rt._sync_Inflations = [633 >>>> 635 (+2)]
sun.rt._sync_Notifications = [991 >>>> 995 (+4)]
sun.rt._sync_Parks = [2343 >>>> 2352 (+9)]
sun.rt.applicationTime = [456912769442 >>>> 487915752549 (+31,002,983,107)]
sun.rt.safepointSyncTime = [361269079 >>>> 361391675 (+122,596)]
sun.rt.safepointTime = [2341686153 >>>> 2342631697 (+945,544)]
sun.rt.safepoints = [1148 >>>> 1150 (+2)]