[Red5devs] A great FREE memory leak tool for Java
Daniel Rossi
electroteque at gmail.com
Fri Oct 24 00:21:40 PDT 2008
eclipse also has a testing and performance profiling framework i am
investigating, it has a agentlib also it may be competitive with what
yourkit does.
http://www.eclipse.org/tptp/index.html
On 24/10/2008, at 2:51 PM, Art Clarke wrote:
> Dan and I had a discussion about this last night and I claimed to him
> that "we weren't really at the memory testing stage in our development
> and so hadn't looked at tools for doing it".
>
> Lo and behold, today, I spent the entire day chasing down memory
> issues; spoke too damn soon.
>
> Anyway, the net result was good for Vlideshow and we learned a lot.
> But there was one trick that I want to share with the team, as it
> makes finding leaks much EASIER under Java.
>
> 1) If you don't already, learn how to make your Java VM do a memory
> heap dump. You can use jconsole, or hprof to do this. See here for
> details:
> http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/index.html
> or here if you can't read ALL the detail:
> http://blog.emptyway.com/2007/04/02/finding-memory-leaks-in-java-apps/
> or just add this to the command line for a Java process that will exit
> or throw an OutOfMemory error:
> "-agentlib:hprof=heap=all,lineno=y,thread=y,format=b"
>
> 2) And then, once you have a dump, may I introduce a FREE plugin for
> Eclipse that visualizes the data:
> http://www.eclipse.org/mat/
>
> You can find the largest objects, trace all references, find the
> fastest path to the root, and other things.l Did I mention FREE?
>
> Install, have it analyze a heap dump, and happy investigating. It
> really helped me find and nail two memory leak issues in our software
> right off the bat.
>
> - Art
>
> _______________________________________________
> Red5devs mailing list
> Red5devs at osflash.org
> http://osflash.org/mailman/listinfo/red5devs_osflash.org
More information about the Red5devs
mailing list