基于JDK-6,使用的类不同,展示的信息可能不同,内容一样的
javac -J-agentlib:hprof=heap=sites Hello.java
percent live alloc’ed stack class
rank self accum bytes objs bytes objs trace name
44.13% 44.13% java.util.zip.ZipEntry
8.83% 52.95% com.sun.tools.javac.util.List
5.18% 58.13% byte[]
5.18% 63.31% com.sun.tools.javac.util.Name[]
上面显示的一个重要的信息是,总空间44.%分配给了java.util.zip.ZipEntry objects. 看trace为301926的信息
TRACE :
java.util.zip.ZipEntry.<init>(ZipEntry.java:)
java.util.zip.ZipFile+.nextElement(ZipFile.java:)
com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:)
com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:)
TRACE :
com.sun.tools.javac.util.List.<init>(List.java:)
com.sun.tools.javac.util.List.<init>(List.java:)
com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:)
com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:)
TRACE :
com.sun.tools.javac.util.Name$Table.<init>(Name.java:)
com.sun.tools.javac.util.Name$Table.<init>(Name.java:)
com.sun.tools.javac.util.Name$Table.make(Name.java:)
com.sun.tools.javac.util.Name$Table.instance(Name.java:)
TRACE :
com.sun.tools.javac.util.Name$Table.<init>(Name.java:)
com.sun.tools.javac.util.Name$Table.<init>(Name.java:)
com.sun.tools.javac.util.Name$Table.make(Name.java:)
com.sun.tools.javac.util.Name$Table.instance(Name.java:)
每一个栈帧信息包含类名字,方法名字,源文件名,行编号.可以通过设置HPROF agent里面的栈帧深度来控制最大帧数.
默认是4.栈帧不仅仅指示指示出执行空间开辟的方法,同样也指出负责内容开辟的方法.

Heap Allocation Profiles (heap=sites)的更多相关文章

  1. Android内存管理(9)*MAT:Heap Dump,Shallow Heap,Retained Heap,Dominating Tree,GC Roots等的含义

    原文: http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.mat.ui.help%2Fconcepts%2Fheapdump.ht ...

  2. Shallow Heap 和 Retained Heap的区别

    http://blog.csdn.net/a740169405/article/details/53610689 Shallow Heap 和 Retained Heap的区别 https://i.c ...

  3. Google 面试题:Java实现用最大堆和最小堆查找中位数 Find median with min heap and max heap in Java

    Google面试题 股市上一个股票的价格从开市开始是不停的变化的,需要开发一个系统,给定一个股票,它能实时显示从开市到当前时间的这个股票的价格的中位数(中值). SOLUTION 1: 1.维持两个h ...

  4. Setting Tomcat Heap Size (JVM Heap) in Eclipse

    this article picked from:http://viralpatel.net/blogs/setting-tomcat-heap-size-jvm-heap-eclipse/ Rece ...

  5. Memory Analyzer tool(MAT)分析内存泄漏---理解Retained Heap、Shallow Heap、GC Root

    Shallow Heap Size 指对象自身所占用的内存大小,不包含其引用的对象所占的内存大小. 1.数组类型 数组元素对象所占内存的大小总和. 2.非数组类型 对象与它所有的成员变量大小的总和.当 ...

  6. java 中Shallow Heap与Retained Heap的区别

    Shallow Size Shallow Size是对象本身占据的内存的大小,不包含其引用的对象.对于常规对象(非数组)的Shallow Size由其成员变量的数量和类型来定,而数组的ShallowS ...

  7. PAT Advanced 1098 Insertion or Heap Sort (25) [heap sort(堆排序)]

    题目 According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and ...

  8. troubleshooting tools in JDK 7--转载

    This chapter describes in detail the troubleshooting tools that are available in JDK 7. In addition, ...

  9. hprof教程

    大部分内容参考http://www.linuxidc.com/Linux/2012-04/58178.htm J2SE中提供了一个简单的命令行工具来对java程序的cpu和heap进行 profili ...

随机推荐

  1. iphone越狱安装python2.7

    cydia  添加源地址:http://apt.so/whitefur 选择python 进行安装 打开ssh连接后输入python 显示python2.7.3 安装成功

  2. Observable讲解

    参见这里 总结: Observable是传统观察者+链式模式的函数式实现 Observable官方文档 还是比较喜欢EventBus,简单粗暴,angular-event-service可支持angu ...

  3. 在MacOSX系统上的一些工具和问题汇总

    Android 模拟器 1. 安装模拟器 点击链接:https://cloud.genymotion.com/page/launchpad/download 需要先注册登录一下. 2.安装Virtua ...

  4. Gerrit安装

    1.安装gerrit [sisi@pre-srv44 ~]$ su - gerrit2Password: [gerrit2@pre-srv44 ~]$ lltotal 83872-rw-r--r-- ...

  5. TCP/IP学习20180626-数据链路层

    数据链路层有三个目的: 为IP模块发送和 接收IP数据报. 为ARP模块发送ARP请求和接收ARP应答. 为RARP发送RARP请 求和接收RARP应答 ip大家都听说过. ARP叫做地址解析协议,是 ...

  6. Quartz不用配置文件配置启动

    StdSchedulerFactory schedulerFactory = null; try { schedulerFactory = new StdSchedulerFactory(); Pro ...

  7. autoconf配置的项目,编译debug版本

    ./configure CFLAGS=" -g " 当然,c++代码就把 CFALGS 改成 CPPFLAGS

  8. Javascript之类型转换(二)

    前言 类型转换js中主要有以下几种情况: 1.条件判断时: 2.对象转基本类型时: 3.四则运算时: 4.‘==’操作符比较值时: 5.比较运算符时. 一.条件判断时 在条件判断时,除了 undefi ...

  9. console输出选择器的问题

    html代码: <input type="text" class="loginInput loginPwText gray" value="密码 ...

  10. 在Linux里安装Samba(文件共享)方便在Windows下面操作

    第一步:安装包 在CentOS是 yum install samba 在Ubuntu是 apt install samba 第二步:添加用户 adduser 用户名 smbpasswd -a 用户名 ...