Javability (Java, Zaurus, Linux, Live) by Jean-Marc Autexier, Saarland/Germany
cat /dev/www | egrep 'Java|Linux|Zaurus|ITnews|Live' > blog

25.9.03 21:05 ( , , , )

Eclipse remote profiling

Since a long time I planned to remote profile some Tomcat applications. Few weeks ago, I discovered Eclipse Profiler Plugin, finally I found the time to check it.

Just follow the documentation and install the plugin (btw., I have tested it with Eclipse 3.0M3 on Win2k and Tomcat 4.1.27). Once you have Eclipse running with the plugin and tested the plugin with local applications, add the JAVA_OPTS line to your catalina.bat. Other than described in the documentation, I had too add to the bootclasspath also the ProfilerDLL.dll file. Only putting it in the java runtime directory of Tomcat JVM didn't work.

Here is my JAVA_OPTS entry:

set JAVA_OPTS=-XrunProfilerDLL:1 -Xbootclasspath/a:[pathToDll]/ProfilerDLL.dll;jakarta-regexp.jar;bcel.jar;profiler_trace.jar;commons-lang.jar -D__PROFILER_PACKAGE_FILTER=__A__%MAINCLASS%;__M__sun.;__M__com.sun.;__M__java.;__M__javax.;__M__org.apache. -D__PROFILER_USE_PACKAGE_FILTER=1 -D__PROFILER_TIMING_METHOD=1

As bcel.jar seems to be not used any more you can remove it.

Then start Tomcat using startup.bat (eventually you have to add/set the JAVA_HOME and CATALINA_HOME environment parameters). In Eclipse, choose 'Remote Profiler' and enter the host. Once started, Eclipse will switch in profiling view, connect to the remote profiling port of your Tomcat instance and show you all threads running in it.

posted by Jean-Marc Autexier | 0 comments | Permalink | Send to Friends | Google it!
Subscribe

Locations of visitors to this page
selected blogs
ressources
Security
Unsorted
Fun
Free&Open Software
archives
This is a personal web page. Things said here do not represent the position of my employer.
RSS icons by: FastIcon.com