![]() ![]() ![]() ![]() ![]() ![]() |
In addition to the standalone Rich Client Platform (RCP) version of JRockit Mission Control 3.0.3, the toolset is also availabe as a plug-in to the Eclipse IDE (Eclipse 3.3 or above). This version of Mission Control provides seamless integration of BEA JRockit's application profiling and monitoring toolset with the Eclipse development platform. By integrating Mission Control with Eclipse, you can combine the features of Eclipse with the power toolset that comprises Mission Control.
This document describes this integration and provides instructions for using the special functionality enabled by integrating Mission Control with Eclipse. The topics include:
When Mission Control is run within the Eclipse IDE, you have access to IDE features that aren't otherwise available in the toolset when it is run as a standalone Rich Client Platform (RCP) application. The most significant of these features is the ability to see specific code in the running application by opening it directly from Mission Control, a function called Jump-to-Source.
The other obvious benefit of integrating JRockit Mission Control with the Eclipse IDE is that it allows you to profile and monitor an application during their development phase just as you would during their production phase. This allows you to spot potential runtime problems before you actually deploy your application to production; for example, you might, while monitoring an application during its development notice a memory leak. By catching the memory leak during development, you can correct it before you migrate your application to a production environment.
Generally, the Eclipse version of Mission Control works identically to the RCP version. Any component in the Eclipse version offers the same functionality and user interface as the comparable component delivered on the RCP.
The biggest difference that Eclipse Mission Control has over the RCP version is the Jump-to-Source feature, described in Jumping to Application Source. With this feature, you can not only see the name of a "problem" class or method displayed in the Mission Control GUI, but you can jump from the displayed name directly to that class or method's source, where you can evaluate the code to see what might be causing the problem. Jump-to-Source is enabled for the Mission Control Console, the JRockit Runtime Analyzer, and the Memory Leak Detector.
While JRockit Mission Control can work with many different Java Virtual Machines, it is highly recommended that you use BEA JRockit as your JVM when running Mission Control on the Eclipse platform. Not only will you avail yourself of BEA JRockit's exceptional performance, but by using this JVM, Mission Control's autodetect feature will be enabled, which makes it simple to connect Mission Control to your locally running application.
C:\Program Files\Eclipse
) and, with a file editor other than Notepad, open the file eclipse.ini
. It will look something like the example in Listing 2-1.-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-vm
<Full path to BEA JRockit's javaw
file>
The full path to BEA JRockit's javaw file might look like this on Windows:
C:\Program Files\Java\jrockit-R27.4.0-jdk1.6.0_02\bin\javaw.exe
or like this on Linux and Solaris:
$HOME/jrockit-R27.4.0-jdk1.6.0_02/bin/javaw
-XgcPrio:
option or increase (or decrease) the initial and maximum heap size by changing the values for -Xms
and -Xmx
. For more information on tuning the JVM, please refer to Profiling and Performance Tuning in the BEA JRockit Diagnostics Guide.
For more information on the available command-line options, please refer to the BEA JRockit Command-Line Reference.
eclipse.ini
, save and close the file. Listing 2-2 shows an example of the eclipse.ini file updated to make BEA JRockit the JVM.-showsplash
org.eclipse.platform
-vm
C:\Program Files\Java\jrockit-R27.4.0-jdk1.6.0_02\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx512m
-XgcPrio:pausetime
A "perspective" defines a set of views and their relative positions within the Eclipse window; in other words, it is a template for graphically presenting different types of information in Eclipse. For example, the Java perspective combines views that you would commonly use while editing Java source files, while the Debug perspective contains the views that you would use while debugging Java programs.
JRockit Mission Control plug-ins for Eclipse come with a predefined perspective called Mission Control. This perspective shows the Mission Control user interface so that you can use the tools that comprise Mission Control to profile applications as you develop them in Eclipse.
The Open Perspective context menu appears (Figure 2-2).
The Open Perspective dialog box appears (Figure 2-3).
The Eclipse window reconfigures to show the Mission Control Standard Perspective (Figure 2-4).
You can change perspectives from Mission Control to another perspective by using one of the methods described in Table 2-1:
If you have already opened the Mission Control Standard Perspective for this project, a Mission Control button will appear next to the Open Perspective button in the top right corner of the Eclipse window (Figure 2-5).
To reopen the perspective, simply click that button.
When running Mission Control plug-ins in an Eclipse IDE you can select a method or class and jump from Mission Control directly to the source code where that method or class is declared. An editor will open up showing you the source file. Jump-to-Source is available in JRA, the Console and the Memory Leak Detector:
This topic contains the following information:
Note: | The following procedure is generic. See Mission Control Plug-ins with Jump-to-Source Enabled for a list of plug-ins where this feature is enabled. |
A context menu appears (Figure 2-6).
Note: | This feature only works with versions of Mission Control integrated into the Eclipse IDE. |
Table 2-2 lists the Mission Control plug-ins where Jump-to-Source is enabled.
![]() ![]() ![]() |