Article: Code Analysis with the Eclipse Profiler

Discussions

News: Article: Code Analysis with the Eclipse Profiler

  1. Article: Code Analysis with the Eclipse Profiler (17 messages)

    Profiling is the programmer's equivalent of raising a car's hood, taking a look at the engine while it's running. As such, it's invaluable for determining what's actually happening to your code during runtime. In "Code Analysis with the Eclipse Profiler," Peter Dawson has written an article on using the free tool, using an application running in Weblogic as a sample.

    Threaded Messages (17)

  2. Does this plugin run in eclipse 3.1?[ Go to top ]

    The author ran the profiler in eclipse 3.0.1. Does this plugin run in eclipse 3.1.

    Thanks!

    CT
  3. As far as I know it does not. It does not run with JSE 5 either.

    Looks like the project is not under active development anymore.

    (to TSS: hope this reply is saved for once)
  4. There is a patch for Eclipse 3.1 available, I'm running it in Eclipse 3.2M1 right now.
    According to the mailinglist, the author is doing a re-write so it's not dead, but only perhaps sleeping for a while.
  5. Is the Profiler alive?[ Go to top ]

    According to the mailinglist, the author is doing a re-write so it's not dead, but only perhaps sleeping for a while.

    It's opensource and I believe Konstantin is planning some more work on it. I guess the more interest in the profiler the better. It worked well enough for me.
  6. no heap dump[ Go to top ]

    Full credit to the author for documenting this so nicely!

    This profiler does not provide you with a heap dump though. It tries to but that part of it does not work (& this was confirmed in the user threads) So its probably great for "code" analysis but you can't use this profiler to solve mysterious memory leaks in your application by doing a heap analysis.
  7. Can anyone recommend any other better profilers for eclipse?
  8. Any other better Eclipse Profilers?[ Go to top ]

    Can anyone recommend any other better profilers for eclipse?

    I couldn't find any. There are some commercial products out there but commercial packages cost money and I would have needed approval to use them, plus support etc.. Hence, I opted for the Colourer. I also considered using tools like JProbe but again, it was a lot harder to get JProbe licensed/deployed/setup etc.
  9. Rational Application Developer[ Go to top ]

    IBM's RAD tool has a decent profiler. Help Dumps, Code Coverage, Thread Analysis, etc. Not free but Eclipse based tool.
  10. Eclipse only ?[ Go to top ]

    There are other IDE Open Source and free : Netbeans has a profiler. Why not consider it ?
  11. Eclipse only ?[ Go to top ]

    There are other IDE Open Source and free : Netbeans has a profiler. Why not consider it ?

    We use Eclipse, so NetBeans wasn't in the frame. However, the principle of using the profiler to create a navigational tree could apply to any tool. Have you tried this with NetBeans?
  12. Eclipse only ?[ Go to top ]

    I use Eclipse because I need it at work. So I didn't use NetBeans, but I just read that NetBeans 5b comes with a profiler. I am curious to see how it compares.
  13. Try TPTP with Eclipse ...[ Go to top ]

    Eclipse has profilling support. See http://www.eclipse.org/tptp/index.html for download or http://www.eclipse.org/tptp/home/documents/tutorials/eclipseCon2005/EclipseCon2005-Tutorial04-Using_the_Test_and_Peformance_Tools_Platform.pdf for info how to use it. Its supports memmory profilling, Performance, Code coverage, sequence diagram of code execution, etc. I try it, its cool :o). It's independent on JDK and supports agents for AIX-PPC, HPUX-RISC,
    LINUX-IA32, LINUX-PPC64, LINUX-ZSERIES,OS/400-ISERIES,SOLARIS-SPARC,WINDOWS-IA32/IA64,Z/OS-ZSERIES.
  14. Cannot get it working with Eclipse 3.1 - no errors in the Error log but the new Perspective (Window > Open perspective > Other > Profiling and Logging) is not shown...
  15. Sorry! Looks like I am missing org.eclipse.emf.ecore.xmi...
  16. Hi,

    Peter in his artcile has documented configuration steps w.r.t Eclipse with WebLogic.

    What will be the VM startup options to configure for some other server like Tomcat.

    Any help will be appreciated.
  17. Just using in Eclipse[ Go to top ]

    The author however does not explain using profiler for just stand-alone java programs. And what is this JAVA_OPTIONS. This article seems to just useful for EClipse and Weblogic.
  18. According to the author, "Start your application using the start-up script. Double-check that the JAVA_OPTIONS and JAVA_HOME values are correct and that both the debug agent and profiler agent are being invoked by the start-up script; if your start-up script does not echo out these values then edit the script to echo these values and restart."

    Debugging requires the substring "-Xdebug -Xrunjdwp:..." in your startup script. Profiling requires the substring "-XrunProfilerDLL:1,0,0 -Xbootclasspath/a:..." in your startup script.

    I have edited my Tomcat startup script to do debugging and profiling SEPARATELY. When I try to enable both options at the same time, my server never starts (it fails after creating 7 threads, according to ps -ef | grep tomcat | wc -l). Any ideas why this can be?

    Here's an example. This is my startup string when I try to start Tomcat with debugging and CPU profiling enabled:

    /opt/sun-jdk-1.4.2.09/bin/java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -XrunProfilerDLL:1,0,0 -Xbootclasspath/a:jakarta-regexp.jar:commons-lang.jar:bcel.jar:profiler_trace.jar -D__PROFILER_TIMING_METHOD=1 -D__PROFILER_USE_PACKAGE_FILTER=1 '-D__PROFILER_PACKAGE_FILTER=__A__org.apache.catalina.startup.Bootstrap;__M__sun.;__M__com.sun.;__M__java.;__M__javax.;__M__org.apache.' -Djava.endorsed.dirs=/home/jrod/apps/tomcat/common/endorsed -classpath '/opt/sun-jdk-1.4.2.09/lib/tools.jar:/home/jrod/apps/tomcat/bin/bootstrap.jar' -Dcatalina.base=/home/jrod/apps/tomcat -Dcatalina.home=/home/jrod/apps/tomcat -Djava.io.tmpdir=/home/jrod/apps/tomcat/temp -Dfile.encoding=iso-8859-1 org.apache.catalina.startup.Bootstrap start

    Any ideas? A solution that provides both of these is greatly needed.