The YourKit profiler is a popular way to profile a Java applications. In addition to plain Java applications, YourKit can be used to profile a web application running in tc Server. This article outlines the instructions for configuring tc Server & YourKit when tc Server is running inside of SpringSource Tool Suite.
For the purposes of this article, it will be assumed that YourKit is installed into the /opt/yjp-9.5.4 directory. The exact installation path and version number may vary based on the installation of YourKit.
The following steps document how to integrate the YourKit profiler with a tc Server instance running inside of STS.
Go to the Servers tab in STS, double-click on your tc Server instance.
Click the Open launch configuration link.
Click on the Arguments tab.
Add one of these lines to the beginning of the VM arguments textbox. Please note that the following examples are specific for 32-bit and 64-bit Linux, if using a different OS, look into the bin directory of the YourKit installation for the specific path to the YourKit agent library.
Example for the Linux 32-bit Java:
-agentpath:/opt/yjp-9.5.4/bin/linux-x86-32/libyjpagent.so=disablestacktelemetry,disableexceptiontelemetry,builtinprobes=none,delay=10000
Example for the Linux 64-bit Java:
-agentpath:/opt/yjp-9.5.4/bin/linux-x86-64/libyjpagent.so=disablestacktelemetry,disableexceptiontelemetry,builtinprobes=none,delay=10000
Restart the tc Server instance. After restarting, ensure the first line of the Console tab displays, a message similar to this:
[YourKit Java Profiler 9.5.4] Loaded. Log file: /home/user/.yjp/log/7191.log
This means that the YourKit profiler has been enabled for the tc Server instance running inside of STS. If you do not see this line in the log file, please check that the VM arguments were correctly edited in step number four.
Start the YourKit application. The Monitor Local Applications panel should now contain an entry for the tc Server instance (Note: it is actually labeled as Tomcat). Click the link to start profiling an application deployed to the tc Server instance.
For additional details, please see the manual installation instruction page in the YourKit documentation.
Note: The information provided in this link is provided as is and VMware does not guarantee the accuracy or applicability of this information. The preceding link was correct as of June 25, 2011. If you find the link is broken, provide feedback and a VMware employee will update the link.