The Artima Developer Community
Sponsored Link

Java Buzz Forum
analyzing IBM JDK heapdumps

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Marc Logemann

Posts: 594
Nickname: loge
Registered: Sep, 2002

Marc Logemann is founder of www.logentis.de a Java consultancy
analyzing IBM JDK heapdumps Posted: Aug 26, 2006 10:26 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Marc Logemann.
Original Post: analyzing IBM JDK heapdumps
Feed Title: Logemann Blog
Feed URL: http://www.logemann.org/blojsom/blog/default/?flavor=rss2
Feed Description: Marc's thoughts on Java and more
Latest Java Buzz Posts
Latest Java Buzz Posts by Marc Logemann
Latest Posts From Logemann Blog

Advertisement

As i have written here, there are no profiling tools available for IBM Power Platform. Not on I5/OS, not on LinuxPPC nor on AIX. This leaves with two options during java development:

1. Don't make any faults regarding memory management
2. use tools IBM offers on alphaworks

Option 1 is not a viable one for me because i do make errors and some of them are definitely memory related. In the noted blog entry, i already covered a tool for analyzing GC, now i want to continue with HeapAnalyzer, another tool which is invaluable for Java issues on IBM hardware.

So the big question is, how do you get a dump file. You can control it via JVM properties or by just waiting until you get an OutOfMemory error, this will produce the dump automaticly by default. If you want to know more about all the profiling related JVM options for IBM JREs, you should consult this site. There are links to various tools and a PDF which explains everything in the area of debugging problems. Use this quick-link for the PDF.

After starting HeapAnalyzer you should open the dump, after that you will get the following window in the tool.

Bild 1-2

As you can see, its a 540MB heap dump.

Now you do a lot of things, but the most useful things to do is to do "Tree View". Just a little screenshot how the TreeView looks like:

Bild 3-1

When right clicking on the root node you should click "compile Leak suspects". This will result in something like this:

Bild 4

When clicking on one of the suspects, you are in the correct place in the tree view. Normally you will see enough to have an idea where your memory gets eaten. In my case its an incredible large array of AccountingHistory objects which come directly from a database. I simply forgot that each History entry is about 500kb big and i loaded a lot of them for displaying in a pageable HTML list. Unfortunately there was a non displayed (but nevertheless existant) CLOB aka String that was my problem. Furthermore i detached the persistence aware object, which doubles the amount of memory. But thats a different story.

So the next time something is slow or die because of OutOfMemory on an IBM Power platform, use what IBM supplies. But at the end i prefer to work with tools like JProfiler for those problems, but as i said, all the major tools dont have agents for IBM PowerPC architectures.

Read: analyzing IBM JDK heapdumps

Topic: Polarion Software has released Subversive 1.0.2, a pure Java, open source Eclipse plug-in that... Previous Topic   Next Topic Topic: Subversive 1.0.2

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use