読者です 読者をやめる 読者になる 読者になる

Quitada ブログ HAX

Hatena Blog でも Quitada ブログ

Tool to find slow memory leak of java applications - version 0.3

IT

I'm pleased to announce that I've released the version 0.3 of the following my tool to find slow memory leak of java applications.

Tool to find slow memory leak of java applications

 

You can download the jar file of version 0.3 from here(src). You can just execute this as a Java appliction with adding this jar file to CLASSPATH. The usage is similar to UNIX diff command like the following.


-----
java quitada.JavaObjectDiff [java histogram file before memory leak] [java histogram file after memory leak]
-----

 

And also, this release is built as a runnable jar. So you can execute this tool with the following command line.

-----

java -jar JavaObjDiff-v0.3.jar [java histogram file before memory leak] [java histogram file after memory leak]

-----

 

In this release, you can additionally see the following output sorted in descending and ascending order based on class name.

-----

Sorted by class name in ascending order.
diff of #instances    diff of #bytes        class name
 ------------------    ------------------    ----------
79            1264            <compiledICHolderKlass>
1739            301136            <constMethodKlass>
187            117464            <constantPoolCacheKlass>
211            179104            <constantPoolKlass>
1739            139120            <methodKlass>
10            3280            <objArrayKlassKlass>
2429            122440            <symbolKlass>
10828            731832            [B
601            51456            [C
 :
0            0            sun.util.calendar.ZoneInfo
0            0            sun.util.resources.LocaleData$LocaleDataResourceBundleControl

-----

 

To do this, please simply add --sort:class and --order:asc option lile the following.

-----

java -jar JavaObjDiff-v0.3.jar --sort:class --order:asc [java histogram file before memory leak] [java histogram file after memory leak]

-----

 

For details of new options, please execute the following command with --help options.

-----

java -jar JavaObjDiff-v0.3.jar --help

-----

 

To tell the truth, I chnaged the sub option of --sort option. There is a bit incompatibility with thie release compared with ther previous release...