java命令行HPROF Profiler
来源:互联网 发布:淘宝5.9.5版本下载 编辑:程序博客网 时间:2024/05/29 03:59
The HPROF Profiler
The Heap and CPU Profiling Agent (HPROF)是JAVA2 SDK自带的一个简单的profiler代理,它通过与Java Virtual Machine Profiler Interface (JVMPI) 交互,将profiling信息通过本地文件或socket输出ASCII或二进制格式的流。
HPROF可以监控CPU使用率,堆分配统计。除此之外,还可以报告JVM所有监视器和线程的完整的堆的dump状态。
HPROF的JVM参数的语法如下:
-Xrunhprof[:help]|[:param=value,param2=value2, ...]
示例:
-Xrunhprof:file=log.txt,thread=y,depth=3
The file parameter determines where the stack dump is written.
file参数决定dump的堆栈写入到那个文件。
HPROF的详细参数如下:
Hprof usage: -Xrunhprof[:help]|[:<option>=<value>, ...]Option Name and Value Description Default--------------------- ----------- -------heap=dump|sites|all heap profiling allcpu=samples|old CPU usage offformat=a|b ascii or binary output afile=<file> write data to file java.hprof (.txt for ascii)net=<host>:<port> send data over a socket write to filedepth=<size> stack trace depth 4cutoff=<value> output cutoff point 0.0001lineno=y|n line number in traces? ythread=y|n thread in traces? ndoe=y|n dump on exit? y
一个javac的示例
Command used: javac -J-agentlib:hprof=cpu=samples Hello.javaCPU SAMPLES BEGIN (total = 126) Fri Oct 22 12:12:14 2004rank self accum count trace method 1 53.17% 53.17% 67 300027 java.util.zip.ZipFile.getEntry 2 17.46% 70.63% 22 300135 java.util.zip.ZipFile.getNextEntry 3 5.56% 76.19% 7 300111 java.lang.ClassLoader.defineClass2 4 3.97% 80.16% 5 300140 java.io.UnixFileSystem.list 5 2.38% 82.54% 3 300149 java.lang.Shutdown.halt0 6 1.59% 84.13% 2 300136 java.util.zip.ZipEntry.initFields 7 1.59% 85.71% 2 300138 java.lang.String.substring 8 1.59% 87.30% 2 300026 java.util.zip.ZipFile.open 9 0.79% 88.10% 1 300118 com.sun.tools.javac.code.Type$ErrorType.<init> 10 0.79% 88.89% 1 300134 java.util.zip.ZipFile.ensureOpen
Command used: javac -J-agentlib:hprof=cpu=samples Hello.javaCPU SAMPLES BEGIN (total = 126) Fri Oct 22 12:12:14 2004rank self accum count trace method 1 53.17% 53.17% 67 300027 java.util.zip.ZipFile.getEntry 2 17.46% 70.63% 22 300135 java.util.zip.ZipFile.getNextEntry 3 5.56% 76.19% 7 300111 java.lang.ClassLoader.defineClass2 4 3.97% 80.16% 5 300140 java.io.UnixFileSystem.list 5 2.38% 82.54% 3 300149 java.lang.Shutdown.halt0 6 1.59% 84.13% 2 300136 java.util.zip.ZipEntry.initFields 7 1.59% 85.71% 2 300138 java.lang.String.substring 8 1.59% 87.30% 2 300026 java.util.zip.ZipFile.open 9 0.79% 88.10% 1 300118 com.sun.tools.javac.code.Type$ErrorType.<init> 10 0.79% 88.89% 1 300134 java.util.zip.ZipFile.ensureOpen
阅读全文
0 0
- java命令行HPROF Profiler
- java profiler
- java profiler
- 【Android】【Memory】命令行提取hprof文件
- Hprof
- 破解YourKit Java Profiler
- 使用MAT的命令行工具分析hprof文件
- profiler
- Profiler
- YourKit Java Profiler 2013发布
- 获奖Java剖析器Profiler
- 关于导入.hprof文件出错Unknown HPROF Version (JAVA PROFILE 1.0.3的解析
- Java剖析工具YourKit Java Profiler
- java性能分析利器YourKit Java Profiler
- java性能分析利器YourKit Java Profiler
- HPROF:Java程序的内存及CPU使用分析工具
- mat工具MemoryAnalyzer进行分析java内存溢出hprof文件
- 使用yourkit java profiler进行性能分析
- eclipse常用插件安装
- DOM
- 设计模式-代理模式
- 3DES加解密算法
- 快速排序
- java命令行HPROF Profiler
- 前端国际化
- 关于Linux 学习的整理
- Git学习笔记(4)----基本操作及命令(本地仓库篇)
- lintcode 通配符匹配 ac代码
- UINavigationController的侧滑返回遇到的坑
- shell中$(( ))、$( )与${ }的区别
- 探讨Android6.0及以上系统APP常驻内存(保活)实现-复活篇
- 京东抢购系统