IBM内存溢出HeapAnalyzer手册_第1页
IBM内存溢出HeapAnalyzer手册_第2页
IBM内存溢出HeapAnalyzer手册_第3页
IBM内存溢出HeapAnalyzer手册_第4页
IBM内存溢出HeapAnalyzer手册_第5页
已阅读5页,还剩60页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、ibm heapanalyzer ibm heapanalyzer creator/developer jinwoo hwang welcome to ibm heapanalyzer. ibm heapanalyzer allows the finding of a possible java heap leak area through its heuristic search engine and analysis of the java heap dump in java applications. you can find more informat

2、ion at /tech/heapanalyzer introduction the heapdump contains a list of all the objects that are in the heap. heapdumps can be very large with millions of items in them. its not always easy to analyze a large file. this tool analyzes heapdumps of java sdk 1.3.1,1.4.x, 5.0

3、and 6.0 ibm heapanalyzer is provided “as-is”. supported features of ibm heapanalyzer are ported to mdd4j which is available in ibm support assistant (/software/support/isa/). mdd4j is an incorporation of ibm heapanalyzer and other ibm java heap analysis tools. prerequisite java

4、runtime environment 6 or higherthe following exception will be thrown if older version of java virtual machine is used:exception in thread main java.lang.noclassdeffounderror: java/util/regex/patternsyntaxexception definitions root object an object for which no (different) object holds a reference.

5、parent object an object (for example, a) that holds at least one reference to some(different) object (for example, b). in this case, a is said to be the parent of b. owner object if an object has more than one parent object, a parent object is chosen as owner object.total size is calculated only wit

6、h owner objects. child object an object (for example, b) for which at least one (different) object(for example, a) holds a reference. in this case b is said to be the child of a. type collection of same objects size the size of an object is the amount of memory that is required to hold that object i

7、n memory. total size the subtree size of an object is the sum of its size and the sizes ofall the objects that it reached from its children. note that eachobject is assigned a unique parent and root during processing.if theres substantial difference in total size betweena parent and its child, its c

8、alled a total size drop. features parent and children view from table view and tree view address search root list view same type view configuration restore and save ibm, solaris, and hp-ux java 5.0 ascii/binary java heap dump support ibm, solaris, and hp-ux java 6.0 ascii/binary java heap dump suppo

9、rt look and feel option automatic detection of truncated heap dump java profile v1.0.1 ascii and binary java heap dump support solaris hprof 1.0.1 binary java heap dump support heapdump file command line support. see “how to run this tool” section supports ibm portable heap dump .phd format as well

10、as ibm heap dump .txt and .txt.gz automatically detects file format supports console window creates a tree from heapdump calculates size of each objects calculates total size of each subtree finds total size drop in a subtree shows gaps between objects by size shows objects by size shows objects by

11、total size shows objects by number of child shows types by size shows types by count/frequency shows types alphabetical order shows gap distribution chart shows detailed information of an object finds type with regular expression drag and drop support in input fields, tree and text bookmarks in tree

12、 navigation locates possible leak suspects how to run this tool you need to use the java 2 platform, standard edition version 6 or higher java runtime environment (jre) to run this tool. usage java xmxheapsize jar ha.jar for example, /usr/java60/bin/java xmx1000m jar ha146.jar heapdump1234.txt if th

13、eres java.lang.outofmemoryerror while you are processing heapdumps, please try increasing the maximum heap size (-xmx) value to give the jvm more memory. maximum heap size should not be larger than the size of available physical memory size for this tool due to performance issue. feel free to contac

14、t me if you have any comments or suggestions. 1. start the heapanalyzer initial screen 2. select file - open and select a heapdump file select ibm heap dump text file, ibm portable heap dump, java profile v1.0.1 ascii/binary heap dump or heapanalyzer processed file to process a heap dump. 3. progres

15、s is shown during processing heapdump. 4. it would take lots of time if you are processing large heapdump. the following is the screen when processing is complete. please do not close this window until you do not need this heapdump. memory leak suspects are compiled under “subpoena leak suspect(s)”

16、menu in tree view. if theres no memory leak suspect, tree view is not displayed by default. click on analysis menu and select tree view menu item to display heap tree. 5. the following is tree view of the heapdump. the icon, , indicates that it has already been included as a child object of owner ob

17、ject in tree view each tree node as in the following format: totalsize(totalsize/heapsize%)objectsize numberofchildobject(number of root objects) name address 6. in tree view, you can see detailed information of a node , you can search for total size drop between parent and child or you can find an

18、address by selecting a node and click on right mouse button. “search for total size drop” will find a size drop between the total size of a parent and the biggest total size of child of the parent. if you cannot find any size drop from the menu “search for total size drop”, you need to decrease mini

19、mum total size drop for search in options. you can find an address in the tree view by selecting the menu “find an address” the following is the result of address search : 7. if you want to review detailed information regarding a node, just click and you will have the information on he right pane. o

20、r you can select the following menu. the following is the screen of detailed node information in heapdump tree 8. you can put bookmarks to save a location and continue to navigate tree by selecting “add bookmark”. bookmarks are stored in “go to bookmark” menu in tree view menu bar. you can go to the

21、 saved locations in tree by clicking bookmarks bookmarks can be deleted by clicking them in “remove bookmark” menu. 9. if there are lots of children in a tree, you can see “there are nnnn more children” at the bottom of the tree. you can see more children by expanding the node. you can also use “sho

22、w more children” menu from parent nodes. now you can see more children. 10. you can locate a possible leak area by using “locate a leak suspect” menu. suspected leak area is displayed as follows. the icon , indicates that its not a root object/class and there are parents for this node. if you want t

23、o display more parents, you can select the menu, “show more parents” if you want to display from root objects, you can select the menu, “show from roots” if you want to see all the objects with the same name, select “list same type” from the menu: the following is the result of the query: by clickin

24、g on right button of your mouse, you can locate a specific object in tree view and you can find parents or children of a specific object. 11. display objects sorted by total size. objects are displayed and sorted by total size. by clicking on right button of your mouse, you can locate a specific obj

25、ect in tree view and you can find parents and children of a specific object. if you click on column header of totalsize, the column will be sorted in reverse order. 12. list objects sorted by their sizes objects are sorted by sizes by clicking on size column header. 13. list objects sorted by number

26、 of child objects are sorted by number of child by clicking on no. child column header. click on address column header to sort objects in address order. click on object column header to sort object in alphabetical order. you can also move each column to different locations. address column was moved

27、next to totalsize column in the following screen. 14. list types sorted by size types are sorted by sum of sizes. by clicking on right button of your mouse, you can find objects with the same name of a specific object. 15. list types sorted by frequency/count 16. list types sorted by alphabetical or

28、der select root list to display root objects. all root objects are displayed as follows: by clicking on right button of your mouse, you can locate a specific object in tree view and you can find same types, parents and children of a specific object. 16. list gaps between objects sorted by size the f

29、ollowing is gaps between objects view by size 17. display gap statistics. gaps distribution chart. do not assume gaps are free spaces. gaps are literally gaps between two objects. java heap dumps do not have any information about what they are. 18. you can configure setting by selecting view - optio

30、ns menu “avoid soft/weakphantom reference” option creates trees that avoid soft/weak/phantom references as owner objects. this option requires more memory and should be enabled before you open heap dumps. 19. search for objects/types and sort them by total size. enter objects/types name in regular e

31、xpression. uppercase/lowercase matters! the following is the list of types which have “byte” in their names. 20. search for objects/types and sort them by size. the following is the list of types which have “byte” in their names, sorted by number of child. by clicking on right button of your mouse,

32、you can locate a specific object in tree view and you can find same types, parents and children of a specific object. 21. by entering exact name, we can review detailed information regarding specific types. for example, you can enter exact name of a type: byte the following is the list of types of b

33、yte as well as detailed information regarding byte the column headers have more information. sum of totalsize is 117,712 bytes. sum of size is 117,712 bytes. there are 140 objects of byte you can find a specific address by selecting search address enter an address of an object the following is the r

34、esult of address search by clicking on right button of your mouse, you can locate a specific object in tree view and you can find same types, parents and children of a specific object. 22. you can hide/show status bar. 23. you can hide/show console. exceptions/errors from heapanalyzer outofmemoryerr

35、or increase xmx up to maximum available size for your environment. if you reach 32 bit address space limit on 32 bit java virtual machine, 64 bit java virtual machine is recommended for large java heap dumps. in most cases, about 1500mb is maximum practical size for xmx on 32 bit java virtual machin

36、e on windows operating systems. for example you might want to use 64 bit java virtual machine for a phd java heap dump with file size of 500mb. exception in thread main java.lang.noclassdeffounderror: java/util/regex/patternsyntaxexceptionheapanalyzer requires java virtual machine version 5 or highe

37、r.the exception is thrown if older versions java virtual machine is used: java.lang.stringindexoutofboundsexception: string index out of range: 0 at java.lang.string.charat(unknown source) at com.ibm.jinwoo.heap.filetask$actualtask.(filetask.java:386) at com.ibm.jinwoo.heap.filetask$1.construct(file

38、task.java:794) at com.ibm.jinwoo.heap.swingworker$2.run(swingworker.java:45) at java.lang.thread.run(unknown source) you can see this exception while processing corrupted heapdumps or truncated ones. truncated or corrupted heapdumps are not reliable. exception while parsing line 9 : 0x0x50003070 100

39、0 java/lang/stringjava.lang.runtimeexception at com.ibm.jinwoo.heap.filetask$actualtask.(filetask.java:321) at com.ibm.jinwoo.heap.filetask$1.construct(filetask.java:794) at com.ibm.jinwoo.heap.swingworker$2.run(swingworker.java:45) at java.lang.thread.run(unknown source)some old ibm sdks generate i

40、nvalid address in heapdumps. after replacing 0x0x with 0x, heapanalyzer can process heapdumps. format error while parsing line 10 : 0x50004050 0x50004050unexpected format in heapdump. possibly its corrupted heapdump. further analysis is unreliable. copyrights and notices (c) copyright ibm corporatio

41、n 2003-2010. all rights reserved. note to u.s. government users restricted rights - use, duplication or disclosure restricted by gsa adp schedule contract with ibm corp. aix, cloudscape, db2, ibm, iseries, os/390, websphere, and z/os are trademarks or registered trademarks of ibm corporation in the united states and/or other coun

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论