Home

JProbe Plugins for Eclipse Guide

image

Contents

1. 52 JProbe Plugins for Eclipse Guide Type the name of the project in the Project name text box for example com jprobe test Click the Create a Java project check box Select the target platform for this plugin and click Next The New Plug in Project Plug in Content dialog box appears Edit the Plug in Properties and Plug in Options as needed and click Next The New Plug in Project Templates dialog box appears If you want to use an existing template for your project click the Create a plug in using one of the templates check box The list of available template options becomes available Select the template you want to use for example Hello World and click Next The Sample Action Set dialog box appears Edit the Action Class Name and Message Box Text properties as needed and click Finish This type of project is associated with the Plug in Development perspective If this perspective is not already open in Eclipse click Yes to open it now The Eclipse plugin project is created Note You can view the newly created project in the Package Explorer view in the Plug in Development perspective Creating the Eclipse Plugin Run Configuration To create a run configuration for your Eclipse plugin 1 4 Select Run Run Configurations The Run Configurations dialog box appears In the left pane select Eclipse Application then click New launch Ba configuration The Run Configurations Create manage and
2. When you attach JProbe to a running session the Session view opens automatically and displays the information that JProbe is collecting This view is different for each of the analysis types Memory Session Runtime View While you are running a Memory session the runtime view displays memory pools and changes in counts in the Java heap as well as garbage collection data The information is displayed in three tabs Memory Pools GC Data and Heap Data Memory Pools The data displayed in the Memory Pools tab varies depending on the JVM and the options that you are using For JVMs that use generational garbage collectors heap pools typically represent the generations For example in the Sun JVMs with some options as shown below Tenured Gen is the old generation while Eden Space and Survivor Space together make up the new generation 66 JProbe Plugins for Eclipse Guide EE NM o 4 amp 8owstuB o Pools and GC Interval One Minute v Classes Loaded 1133 Classes Unloaded 0 Memory Pools GC Data Heap Data Memory Pools Mb 6 Memory Pools Eden Space Survivor Space 4 tenured Gen Available 2 00 00 15 00 00 25 00 00 35 00 00 45 00 00 55 00 01 05 Memory Pool Distribution Used Mb Committed Mb Available Mb Maximum Mb Total 7 6 18 4 10 8 167 3 I Heap Subtotal 0 5 5 2 47 66 7 Eden Space E 31 0 0 0 9 0 9 42 Survivor Space E 3 0 0 0 1 0 1 0 5 Tenured Gen Sls 0 5 4 2
3. MIME Mappings 4 Repeat steps 1 to 3 for each application server that you want to run with JProbe Running the Application Server with JProbe To run an application server with JProbe 1 In the Servers view right click the name of the server and select Profile The Run Server with JProbe dialog box opens On the JProbe tab select the type of analysis to be performed while running your application Memory Performance or Coverage On the Filters tab define filters if needed On the Advanced Options tab specify any JProbe specific advanced configuration settings for example set JProbe Option Name to jp_console_port and Value to 52991 Click Finish 60 JProbe Plugins for Eclipse Guide The application server now starts with JProbe and the new status Profiling is displayed in the State column The Console view shows details about the status of the processes executed Note If you decide to cancel the operation by clicking Cancel instead of finishing it the server starts in Eclipse without JProbe The status of the operation displayed in the State column is also Profiling which may be misleading For some application servers an additional window opens You can minimize this window but do not close it as it is required for JProbe to operate correctly Note You can have only one application server started with JProbe in Eclipse at any given time Verify the connection port in the server Console view If
4. The project name appears in the Navigator Importing Heap Dumps The JProbe project is the default folder into which you import heap dumps You may want to create a separate JProbe project for heap dumps To import a heap dump 1 2 3 In the Navigator select the JProbe project that you created Click File gt Import Expand the JProbe folder Note Ifthe JProbe perspective and menu are visible but the JProbe project type is not available check the JProbe menu If it contains only the Quick Start Page item please check the JRE version you used to launch Eclipse You must use a Java 1 6 JRE to run the JProbe plugins for Eclipse For detailed installation instructions see the JProbe Installation Guide The same situation occurs if the dependencies for the JProbe plugins are not met for example if third party plugins like GEF are not installed For a detailed list of system requirements see System Requirements on page 14 32 JProbe Plugins for Eclipse Guide Import an IBM PHD Dump as a JProbe Memory Snapshot Select an import source type fiter text S General archive File e Breakpoints a Existing Projects into Workspace C File system E Preferences E cvs B Probe IA Import Binary HPROF Dump TA Import IBM PHD Dump IA import IBM Text Dump US import Text HPROF Dump E Plug in Development S Team 4 Select the type of heap dump you want to import and click Next Impo
5. 1 From the main menu select JProbe gt Manage Licenses Getting Started with JProbe Plugins for Eclipse 45 Managing Licenses The JProbe Licensing dialog box appears 2 Select the license model you want to use by clicking the correspondent tab Node Locked Per Seat Licenses Concurrent Licenses Note To obtain a JProbe Trial Licence click Obtain License The JProbe Trial License Web page appears in a browser window 3 Fill in the required information as specified in the GUI For more information about using the license server see the Quest Software License Server Administrator s Guide 46 JProbe Plugins for Eclipse Guide 3 Integrating JProbe into Eclipse This chapter describes how to integrate JProbe into an Eclipse environment The integration process varies depending on the type of application that you want to analyze with JProbe When Eclipse is launched with the JProbe plugins several menu options are added to the standard Eclipse menu bar These menus allow you to run different types of application with JProbe view the runtime session in the JProbe perspective and analyze the results with JProbe This chapter contains the following sections Integrating JProbe to Run Java SE Applications sssseeeenne 48 Integrating JProbe to Run Java EE Applications eene 55 48 JProbe Plugins for Eclipse Guide Integrating JProbe to Run Java SE Applications
6. APADENE A EE ARATE a a AEE Epa 11 Contacting Quest Support rere E EROR Rei EE E 11 Quest COMMUNN ES iis 5 ceteri tr ctn en EDO Gite rtr d et t A te vtov 11 Installing JProbe Plugins for Eclipse eren nennen tente nrnnnn nennen 13 System RequireiTients etae rt ED RR DRE RUE re PE cL CH TRE RH Co REI 14 Installing thie JProbe Pl gins ini Eclipse s 55 2 9 tc Re et pem a te REB Es 14 Installing the Graphical Editing Framework GEF senes 15 Downloading and Installing JProbe Plugins for Eclipse seen 16 Launching Eclipse with JProbe Plugins for Eclipse cescececseseesestesesseeseseeseseeseeseseeseeeseeeseseeateaseneaseneaseeeaeeeeeees 18 Installing the JProbe Plugins Using Pulse Explorer eeenennnnnnnnnnnnnnnnnnnnnn 20 Getting Started with JProbe Plugins for Eclipse eene nter tenen tenens 27 Opening the JProbe PerSpectiVe s ene ERE RR ERN RUNS 28 Creating a Project for JProbe Snapshots sse tereti nettes 29 Importing Heap Dumipss 2 vei EE RP i d e e e PRA UR Ei AD DRE EC e Ga ee tt 31 Importing Snapshots cn ret rtt tnt ti i n IH ain deinen faded a 33 Creating a Project for the JProbe Demo Code tentent tentent tentent 34 Creating and Managing Gategories 32 03 candice ete eee elec ea o A s 36 4 JProbe Plugins for Eclipse Guide Adding Categories iscsi onc e
7. Editing Framework GEF with the same version number as Eclipse Note If you are using Pulse Explorer to manage multiple Eclipse software configurations the GEF is automatically installed together with the Eclipse version you select Quest JProbe 8 3 If you plan to run a Java EE application with JProbe in Eclipse you also need to install the following versions of the WTP Web Tools Platform framework on your system For Eclipse Classic 3 3 2 WTP complete 2 0 2 For Eclipse Classic 3 4 x WTP 3 0 1 For Eclipse IDE for Java EE Developers you do not need to install an additional WTP framework it is already integrated with this Eclipse version For Eclipse 3 5 WTP 3 1 You can obtain the WTP files from http download eclipse org webtools downloads For additional information see Integrating JProbe to Run Java EE Applications on page 55 Installing the JProbe Plugins in Eclipse This section presents the procedures that a generic Eclipse user must follow in order to download and install the JProbe Plugins for Eclipse in his Eclipse environment It also presents different methods of launching Eclipse with the newly installed plugins Important If you are using Pulse Explorer to manage multiple Eclipse software configurations it is recommended that you install the JProbe Plugins for Eclipse as presented in section Installing the JProbe Plugins Using Pulse Explorer on page 20 Installing JProbe Plugins for Eclipse 15
8. IDE About This Guide The JProbe Plugins for Eclipse Guide presents the process of installing JProbe Plugins for Eclipse and setting up your JProbe environment within Eclipse This document is intended for Eclipse users who want to analyze the memory usage and performance of their Java code or find out how well their test cases cover their code The JProbe Plugins for Eclipse Guide is organized as follows Chapter 1 Installing JProbe Plugins for Eclipse describes how to install JProbe Plugins for Eclipse and how to launch Eclipse with the plugins Chapter 2 Getting Started with JProbe Plugins for Eclipse presents how to set up a JProbe project and import snapshot files Chapter 3 Integrating JProbe into Eclipse describes how to integrate JProbe into an Eclipse environment Chapter 4 Running a JProbe Analysis in Eclipse describes how to run your Java application with JProbe in Eclipse which allows you to identify problems with your application and investigate those problems Introduction to This Guide 9 JProbe Documentation Suite JProbe Documentation Suite The JProbe documentation suite is provided in a combination of online help PDF HTML and TXT Online Help You can open the online help by clicking the Help icon on the JProbe toolbar PDF The complete JProbe documentation set is available in PDF format on SupportLink The PDF documentation can also be found in the Documentation folder on the JProbe DVD The
9. Installing the JProbe Plugins in Eclipse To install the JProbe Plugins for Eclipse in your Eclipse environment Note This procedure assumes that you have already installed an Eclipse environment and the Sun JRE on your machine 1 Install the appropriate GEF version as specified in System Requirements on page 14 For detailed instructions see Installing the Graphical Editing Framework GEF on page 15 2 If you plan to run a Java EE application with JProbe in Eclipse install the appropriate version of the WTP framework as specified in System Requirements on page 14 3 Download and install the JProbe Plugins for Eclipse For detailed instructions see Downloading and Installing JProbe Plugins for Eclipse on page 16 4 To use JProbe Plugins for Eclipse launch Eclipse with the appropriate command line options For detailed instructions see Launching Eclipse with JProbe Plugins for Eclipse on page 18 Installing the Graphical Editing Framework GEF The GEF plugins are required by components that are used within the JProbe views You may need to download the framework it does not come with the basic Eclipse 3 3 distribution Choose the version that matches the version number of your Eclipse install For example if you installed Eclipse 3 3 2 select GEF 3 3 2 To obtain and install the GEF plugins 1 Go to the Downloads page on the Eclipse Web site http download eclipse org tools gef downloads 2 Locate th
10. JProbe options JVM Contains information about the Java executable that is running the application To view the execution log 1 Doone ofthe following e In the session runtime view select Runtime Execution Log gt Running a JProbe Analysis in Eclipse 73 Viewing the Session History In the Navigator right click a snapshot and select JProbe gt Execution Log E 2 Review the information 3 Click OK Viewing the Session History When running a session you can access the Session History from the Memory Session view toolbar The Session History dialog presents events that occurred since the Console has connected to the session for example the start recording stop recording snapshot taken events A timestamp and a short description are provided in the left pane for each event Additional details are presented in the right pane for the selected events For example the start recording event shows the details of the recording level and a list of filters which may appear abbreviated depending on their length when applicable Also for example the snapshot taken event shows the source of the request To view the session history Inthe Memory Session view click View Session History on the toolbar MELOS Session events since you last connected to the session Time Event Description Details for the Selected Event 04 03 20 859 Session connect D i 7 Snapshot taker Snaps
11. Launching a Java SE Application with JProbe sseseseee eene tnnt 54 Integrating JProbe to Run Java EE Applications Creating an Applicatiori SerVer atre et ih each Testing the Application eletti fe rae tali ea el o rie cc n ep eet Setting the Server Timeout Delay sse entente ttnnntn tent tentten tente teniente tentis 57 Running the Application Server with JProbe sssseeeeeee nennen treten trenes 59 Running a JProbe Analysis in Eclipse eene nennen nnne tnnt tnnt 61 Running a Java Application with JProbe in Eclipse sene 62 launching the Application s 53 d a rc RE e OR Da D EU D REDE 62 Attaching JProbe to the Application tte tct EROR REMO EE IRR ta 63 Running a JProbe Session in the Background seen 64 Viewing Dala in a Ruhtime S6SSIOFI 4 2 cielo netten rtt peni en rete pen E ent Tere ee Re 65 Memory Session Runtime View tentent nttnnttnnte tte ntent tentent tentent tentent te itte tis 65 Table of Contents 5 Performance Session Runtime View sse trennen tentent tenete nennen 69 Coverage Session Runtime View sse tentent tentent tenete tenentis 71 Viewing the Execution Log Viewing the Session History Viewing Snapshot Data 6 JProbe Plugins for Eclipse Guide Introduction to This Guide This chapter provides i
12. application Only engines currently not connected to a Console are shown In the Add Snapshots To Project section choose an existing JProbe project for the snapshots captured during this session by selecting its name from the list or define a new one by clicking New JProbe Project Note For details about creating a JProbe project for your snapshots see Creating a Project for JProbe Snapshots on page 29 Click OK The runtime session view appears You can now begin to monitor what is happening in your application in the runtime session views For details see Viewing Data in a Runtime Session on page 65 Running a JProbe Session in the Background You can start a JProbe session connection monitor before launching an application and run it in the background To run a JProbe session in the background 1 Click JProbe Attach to Session The Attach to Running JProbe Session dialog box appears Running a JProbe Analysis in Eclipse 65 Viewing Data in a Runtime Session 2 Click OK The JProbe Session Connection Indicator dialog box appears JProbe tries to connect to the localhost by default on port number 52991 3 Click Run in Background The JProbe session monitoring starts and runs in the background Tip You can check the status or terminate this task later on from the Eclipse Progress view click Window Show View Other and select the General Progress option Viewing Data in a Runtime Session
13. click No Note If you disabled the prompt you may end up in the Java perspective If so switch back to the JProbe perspective The project name appears in the Navigator The code is under demos 36 JProbe Plugins for Eclipse Guide Creating and Managing Categories Categories provide a powerful tool for organizing the data that JProbe collects about your application JProbe provides some preset categories such as Java SE and Java EE but you can also create your own Categories are used in the Memory analysis tool to group instances Manage Categories To create a category or folder select the Folder that will become its parent and press New Folder or New Category Use drag and drop to move or reorder categories Categories S E Root Categories LE System Code B Jav Java SE Filter List E Java Tools Category or Pattern Action 3 L 3rd Party Frameworks Java VM Threads include w amp Other Java SE include 9I hy code Java Base Libraries include Java Integration Libraries include Java UI Toolkits include Primitive Arrays include New Folder New Category Restore Defaults Ok Cancel Adding Categories You add code to categories using filters For information about filters see Syntax for Filters on page 37 To add a category 1 From the main menu select JProbe gt Manage Categories 2 Select the folder in which the category logically belongs and click New Category 8 9 Get
14. default location of the documentation after an installation is lt jprobe_home gt docs Adobe Reader is required HTML Release Notes are provided in HTML and TXT format The default location of this document after an installation is lt jprobe_home gt docs The Ant Tasks User Manual is also provided in HTML format The default location of this document after an installation is lt jprobe_home gt automation doc To open it navigate to index html Core Documentation Set The core documentation set consists of the following files JProbe Installation Guide PDF JProbe User Guide PDF and online help JProbe Reference Guide PDF JProbe Plugins for Eclipse Guide PDF JProbe Tutorials PDF and online help JProbe Release Notes HTML and TXT Ant Tasks User Manual HTML Feedback on the Documentation We are interested in receiving feedback from you about our documentation For example did you notice any errors in the documentation Were any features undocumented Do you have any suggestions on how we can improve the documentation All comments are welcome Please submit your feedback to the following email address 10 JProbe Plugins for Eclipse Guide am docfeedback quest com Please do not submit Technical Support related issues to this email address Text Conventions The following table summarizes how text styles are used in this guide Convention Code Description Monospace text represents code code obj
15. matches both java rmi server RMISocketFactory com quest say and java security cert X509CRLEntry Getting Started with JProbe Plugins for Eclipse 39 Creating and Managing Categories If you type this Canonical form is And filters are applied to this foo bar foo bar All methods in the class bar in package oo This is likely not what you wanted See the next example foo bar foo bar A I methods in all classes in oo bar or any of its subpackages foo bar no change Methods whose names start with t and end String t e in ein foo bar String matches both toUpperCase and toLowerCase Adding Folders To add a folder 1 2 3 4 5 6 From the main menu choose JProbe Manage Categories Right click a folder and choose New Folder Enter a name in the Name field Click Apply Repeat to create additional folders Click OK Editing Categories To edit a category 1 2 3 From the main menu choose JProbe Manage Categories Select a category and click Edit Make changes to the filter list Note To quickly remove categories or patterns from the list select the item and press the Delete key Click Apply Click OK 40 JProbe Plugins for Eclipse Guide Renaming Categories or Folders To rename a category or folder 1 From the main menu select JProbe Manage Categories 2 Right click a category and choose Rename 3 Specify the new name and click OK 4 Click OK Del
16. run configurations dialog box appears In the right pane type the name of the configuration for your Eclipse application in the Name text box Leave the rest of the settings at their default values Click Apply Integrating JProbe into Eclipse 53 Integrating JProbe to Run Java SE Applications The new run configuration is created and appears in the left pane under Eclipse Application 5 Click Run to run the plugin inside Eclipse and verify that the configuration is working A new Eclipse window opens displaying an additional user s plugin 6 Click Close Configuring JUnit in Eclipse Before running a JUnit application with JProbe in Eclipse you need to configure the JUnit application in your environment The configuration process is similar to configuring Java applications in Eclipse For more information see Configuring a Java Application in Eclipse on page 48 This guide assumes that you have already configured your JUnit application in your system prior to JProbe integration Configuring JUnit Plug in Test in Eclipse Before running a JUnit Plug in Test application with JProbe in Eclipse you need to configure the JUnit Plug in Test application in your environment The configuration process is similar to configuring Java applications in Eclipse For more information see Configuring an Eclipse Application in Eclipse on page 51 This guide assumes that you have already configured your JUnit Plug in Test appl
17. set to a specific value The timeout delay for all application servers running on an Eclipse 3 3 environment can be set globally To set the timeout delay for application servers running on an Eclipse 3 3 environment 1 Select Window Preferences The Preferences dialog box appears 2 Click Server in the left pane The right pane displays the server configuration settings 3 Setthe Server timeout delay to Long Longer or Unlimited the latter two options are recommended 58 JProbe Plugins for Eclipse Guide Preferences type fiter text Server 5 General E Ant 8 Help Synchronize servers on workbench startup InstalljUpdate Internet i Java Publishing interval in seconds 5 t JProbe E Plug in Development 1 RunjDebug Publishing interval in seconds 60 5 Server Team v Show Servers view when server state changes Automatically publish to local servers Automatically publish to remote servers Prompt before making irreversible changes within an editor Server timeout delay Longer v Unlimited Long Normal Short 4 Click Apply This timeout delay applies to all application servers installed in your Eclipse 3 3 environment 5 Click OK The timeout delay for application servers running on Eclipse 3 4 or Eclipse IDE for Java EE Development environments need to be set individually for each server To set the timeout delay for an appl
18. use by Eclpse Users ege The classic Eclipse download the Eclipse Platform Java Development Tools and Plug in Development Environment gt including source and both user and programmer documentation qu Eclipse 3 4 for PHP for use by PAP Developers An IDE For PHP developers Browse Profile Catalog Eclipse 3 4 IDE for C and C for use by C C Developers An IDE for C C developers with Mylyn integration re Eclipse 3 4 IDE for Java or use by Java Developers The essential tools for any Java developer including a Java IDE a CVS client XML Editor and Mylyn MyEclipse 7 1 for use by Java Developers MyEclipse Enterprise Workbench is the top rated Eclipse based IDE providing a rich experience for developing Java and enterprise applications MyEclipse 7 1 Blue Edition for use by Java Developers MyEclipse Blue Edition is a powerful Eclipse based IDE designed for WebSphere development allowing access to open standards and usability Features that go beyond what RAD currently offers Windows support only lt Summary Details EPIC Votes Aot Available License Free EPL Not Available Eclipse org No further details are available for this item The classic Eclipse download the Eclipse Platform Java Development Tools and Plug in Development Environment including source and both user and programmer documentation Create a new profile for the Eclipse environment in which you are planning to integrat
19. 3 7 62 0 Non Heap Subtotal 72 13 3 6 1 100 7 Code Cache E 71 0 7 0 7 0 0 33 6 Perm Gen m 1 6 5 12 6 6 1 67 1 Session Connected 8 Finishing current recording Snapshot C JProbe workspace tutorials_v83 snapshot_raw_1 jph has been added to project tutorials v83 as snapshot jph Finished recording snapshot C JProbe workspace tutorials_v83 snapshot_raw_1 jph successfully written Finishing current recording Snapshot C VProbelworkspaceltutorials v83lsnapshot raw 2 jph has been added to project tutorials v83 as snapshot_1 jph Finished recording snapshot C JProbe workspace tutorials_v83 snapshot_raw_2 jph successfully written The table displays both heap and non heap data but you can control which memory pools are displayed in the chart You can also change the data display interval for the memory pools and garbage display Note Changing the Memory Pools settings does not affect the polling interval which is always 5 seconds To configure memory pools 1 Click Configure Pools The Select Memory Pools dialog box appears Running a JProbe Analysis in Eclipse 67 Viewing Data in a Runtime Session Eden Space Survivor Space Tenured Gen ONon Heap 2 Select the memory pools that you want to display and click OK The graph is refreshed to display the pools that you chose To change the Memory and GC data display interval Select a different inte
20. Abt Available Screenshots Requirements Pricing License Commercial Quest Software JProbe is the most comprehensive Java profiler used for inteligent diagnostics on memory usage performance profiling and test coverage Memory Analysis Identify and resolve Java memory leaks and object cycling lt gt Performance Analysis Identify and resolve Java bottlenecks and deadlocks Browse Categories p Coverage Analysis Identify unexecuted lines of code This catalog contains a list of software during unit testing that is specifically selected by the Pulse team as items we re sure you will find engaging Whether open source free Automation Analyze memory performance and coverage during the build process software or software you may want to consider purchasing this list is a great place to start for high quality Eclipse Miinill components a c Add the plugins to your profile by dragging and dropping the JProbe for Eclipse option over your profile in the Explorer pane d Click OK in the confirmation dialog box that appears at the end of the operation 4 Complete your profile by adding a JRE Note Sun Java 1 6 or later is required a Inthe Explorer pane click Add on Software Browse Categories b Type java in the search field located in the upper right corner of the Pulse Explorer interface and press the Enter key Pulse locates the JRE versions available for your sele
21. E QUEST SOFTWARE GUProbe 8 3 Plugins for Eclipse Guide 2009 Quest Software Inc ALL RIGHTS RESERVED This guide contains proprietary information protected by copyright The software described in this guide is furnished under a software license or nondisclosure agreement This software may be used or copied only in accordance with the terms of the applicable agreement No part of this guide may be reproduced or transmitted in any form or by any means electronic or mechanical including photocopying and recording for any purpose other than the purchaser s personal use without the written permission of Quest Software Inc If you have any questions regarding your potential use of this material contact Quest Software World Headquarters LEGAL Dept 5 Polaris Way Aliso Viejo CA 92656 www quest com email legal quest com Refer to our Web site for regional and international office information JProbe Patents Patent pending Trademarks Quest Quest Software the Quest Software logo AccessManager ActiveRoles Aelita Akonix AppAssure Benchmark Factory Big Brother BusinessInsight ChangeAuditor ChangeManager DeployDirector DirectoryAnalyzer DirectoryTroubleshooter DS Analyzer DS Expert ERDisk Foglight GPOADmin Imceda IntelliProfile InTrust Invirtus iToken I Watch JClass Jint JProbe LeccoTech LiteSpeed LiveReorg LogADmin MessageStats Monosphere NBSpool NetBase NetControl Npulse NetPro PassG
22. F Dump EP 9 Plug in Development GS Team Cancel 4 Click Next 5 Click the Browse button beside the From Directory text field and browse to the directory containing the snapshot files 6 Select the snapshots to import 34 JProbe Plugins for Eclipse Guide All snapshots select the check box beside the directory name or click Select All Some snapshots select the check boxes beside the snapshots 7 By default snapshots are imported to the currently selected JProbe project To change the project specify the project name in the Into folder text box E Import File system Import resources from the local file system From directory C JProbe Snapshots v amp Snapshots Adventure Baseline jpc J Adventure Merged jpc Adventure TestCasel jpc Adventure TestCase2 jpc GamePack MethodTime ipp LeakExample Fixed jph LeakExample main entry raw 1 jph LeakExample main entry raw 2 jph LeakExample main entry raw 3 jph LeakExample main exit raw 2 iph Filter Types Select all Deselect all Options Overwrite existing resources without warning O Create complete folder structure Create selected Folders only lt Back Finish Cancel 8 Click Finish The snapshots are listed under the project in the Navigator For information on viewing snapshot data see Viewing Snap
23. Java SE Applications In the left pane select Java Application then click New launch configuration x The Run Configurations Create manage and run configurations dialog box appears In the Name text box in the right pane type the configuration name for your Java application On the Main tab choose your Java Project and Main class Note For example to perform JProbe s Network tutorial you need to choose demos memory network Network as the main class Click Apply The new run configuration is created and appears in the left pane under Java Application Click Close You can now launch your application with the JProbe analysis For more information see Launching a Java SE Application with JProbe on page 54 Configuring an Eclipse Application in Eclipse Before running an Eclipse application with JProbe in Eclipse you need to configure the Eclipse application in your environment If your Eclipse application is already configured in Eclipse you can ignore this section Configuring an Eclipse application in Eclipse includes the following steps 1 Creating an Eclipse Plugin Project 2 Creating the Eclipse Plugin Run Configuration Creating an Eclipse Plugin Project To create an Eclipse plugin project Select File New Project The New Project Select a wizard dialog box appears 2 Select Plug in Development Plug in Project and click Next The New Plug in Project dialog box appears
24. Next The Import File system dialog box appears In the From directory box select the directory where your Java application resides Note For example to import JProbe s Network application you need to choose the lt jprobe_home gt demos memory network directory path then the lt jprobe_home gt demos memory sim directory path The lower boxes are populated with the files existing in the selected directory Select the check boxes beside your Java application classes and images Note For example to import the Network example classes you would select all the java files and image files in the lt jprobe_home gt demos memory network and the lt jprobe_home gt demos memory sim directories In the Into folder box select a directory in which you want to import the Java application Select any additional importing settings from the Options section e Overwrite existing resources without warning Create complete folder structure Create selected folders only Click Finish The Java application is imported into your project Note You can view the newly created package in the Package Explorer view in the Java perspective Compile your application to ensure that it has no errors Creating a New Run Configuration To create a new run configuration for your Java application 1 Select Run JProbe Configurations The Run Configurations dialog box appears Integrating JProbe into Eclipse 51 Integrating JProbe to Run
25. SE applications 48 into Eclipse 47 JProbe Plugins for Eclipse downloading 16 JProbe session running in the background 64 jprobe eclipse plugins zip downloading JProbe Plugins for Eclipse 16 JUnit Plug in Test configuring in Eclipse 53 JUnit configuring in Eclipse 53 L launching Eclipse 18 by editing the INI file 18 from Pulse 24 from the command line 19 with JProbe Plugins for Eclipse 18 launching Java application with JProbe in Eclipse 62 launching Java SE application with JProbe 54 licenses managing 44 M managing categories 36 JProbe preferences 40 licenses 44 Memory Pools 65 O opening the JProbe perspective 28 OSGi applications configuring in Eclipse 53 P preferences managing 40 project creating for JProbe snapshots 29 JProbe demo code 34 R renaming categories 40 folders 40 run configuration for Eclipse applications 52 for Java applications 50 running a Java application with JProbe in Eclipse 62 a JProbe analysis in Eclipse 61 application servers with JProbe 59 running JProbe session in the background 64 runtime session viewing data 65 S session history viewing 73 setting server timeout delay 57 snapshot data viewing 73 snapshots creating a project for 29 importing 33 support 11 syntax for filters 37 system requirements 14 T tabs GC Data 67 Heap Data 68 Memory Pools 65 Threads 69 technical support 11 testing application servers 57 Index 77 text conventions 10 t
26. T IN NO EVENT SHALL QUEST BE LIABLE FOR ANY DIRECT INDIRECT CONSEQUENTIAL PUNITIVE SPECIAL OR INCIDENTAL DAMAGES INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS BUSINESS INTERRUPTION OR LOSS OF INFORMATION ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT EVEN IF QUEST HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES Quest makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice Quest does not make any commitment to update the information contained in this document License Credits and Third Party Information See Third Party Contributions htm in your JProbe doc installation directory Plugins for Eclipse Guide November 2009 Table of Contents Introduction to This Guide eene aaea ae a a eaa oraaa taste ttn San EEEE ainiai 7 ADOULJPIODO iiia EA Ea E OD dU d d ido als ria b p T 8 POTENCIA Sairi areas aetna itera nia cass aaiauean AAAA A 8 JProbe Documentation Suite cic rne onte ph Cete re HN INR RR RA tun 9 Core Documeritation Setini rni ae iet deni beret be ee uet nin ere ra aia 9 Feedback on the Documentations 5 5 eh e HERREN obe a e es 9 Text Conventioris 0 5 1 ave ER DU Oan OO putain un ebd ee eda cete eines 10 About Quest Software INC hera A A A N 10 Contacting Quest DOftWBT6 1o tro RR HERE RR NER
27. You can integrate JProbe with Eclipse to run the following types of Java SE applications Java Application Eclipse Application JUnit JUnit Plug in Test OSGi Framework The integration process includes the following steps 1 Configuring your Java SE application Follow the instructions in one of these procedures as needed Configuring a Java Application in Eclipse Configuring an Eclipse Application in Eclipse Configuring JUnit in Eclipse Configuring JUnit Plug in Test in Eclipse Configuring an OSGi Application in Eclipse Opening the JProbe perspective in Eclipse For more information see Opening the JProbe Perspective on page 28 Launching your Java SE application with JProbe in Eclipse For more information see Launching a Java SE Application with JProbe on page 54 Configuring a Java Application in Eclipse Before running a Java application with JProbe in Eclipse you need to configure the Java application in your environment Note If your Java application is already configured in Eclipse you can ignore this section Configuring a Java application in Eclipse includes the following steps 1 Creating a Java Project 2 Creating a Java Package Integrating JProbe into Eclipse 49 Integrating JProbe to Run Java SE Applications 3 Importing a Java Application into Your Project 4 Creating a New Run Configuration Creating a Java Project To create a Java project 1 Select File N
28. abs are the same as in a Memory session For information about them see Memory Session Runtime View on page 65 Note When you click Take an HPROF Heapdump on the toolbar an HPROF dump is taken converted to a JProbe snapshot and added to the Snapshot Navigator You can then analyze it using the JProbe Memory analysis tool To use this feature you must run your application with a Sun JVM Threads The Threads tab contains a graph and a list which are updated every four seconds Memory Pools GC Data Threads Thread States click on a bar to show threads in that state Number of Threads BlRunnable Waiting iblocked other L 0 1 2 3 4 5 6 7 8 9 10 Total Threads 20 Last Updated 15 33 37 Filter Threads v 20 20 _ show all update Thread Details Detect Deadlock Name Philosopher 1 5s Philosopher 2 State BLOCKED on denos performance diners ChopStick cOcSb5 Philosopher 3 Total blocked 1 Total waited 2 Philosopher 4 Philosopher 5 Lock Owner Philosopher 2 Sg Java RMI Threads SH Java UI Threads 52 Java VM Threads H MK Threads Object Monitors Locked by Thread denos performance diners ChopStick87a9224 Stack Trace demos per formance diners Philosopher run Philosopher java 86 java lang Thread run Unknown Source lt The graph displays how many threads are in a given state at a certain time The threads are grouped as presen
29. all the nested features installed on your Eclipse IDE Choose TPTP Profiling for Web Applications and click its corresponding Disable link Click OK 56 JProbe Plugins for Eclipse Guide 5 To disable TPTP profiling for Web applications restart Eclipse Integrating JProbe into Eclipse to run Java EE applications involves the following steps 1 2 3 4 Creating an Application Server Testing the Application Server Setting the Server Timeout Delay Running the Application Server with JProbe Creating an Application Server By creating a server you create a pointer from the workbench to an existing installation of an application server JProbe supports several types of application servers for a complete list see the JProbe Installation Guide To create an application server in Eclipse 1 Open the Java EE perspective Note For information about perspectives open the Eclipse online help and select Workbench User Guide Tasks Working with perspectives Select File gt New gt Other The New Select a wizard dialog box appears Select Server Server and click Next The New Server Define a New Server dialog box appears In the Server s host name text box type the fully qualified DNS name or the IP address of the host machine where the server is running The default address is localhost Select the application server type from the Select the server type list for example Apache Tomcat v6 0 Se
30. and re run the JProbe analysis session with the improved code to see the improvement in memory usage performance or test case coverage This chapter contains the following sections Running a Java Application with JProbe in Eclipse Viewing Data lina Runtime SESSION seen tract tnnc ceste b td cta Ew isr Im Viewing ihe Session MISO ass accede et rnm da mer erem cn kr 73 Viewing Snapshot Ea uice eee recente rrr detecte recte pe bb tds 73 62 JProbe Plugins for Eclipse Guide Running a Java Application with JProbe in Eclipse After you have configured an application started it and stopped it you are ready to launch your application with JProbe This is done is two steps Launching the Application e Attaching JProbe to the Application Alternatively you can start the JProbe session monitoring first run it in the background and then launch your application For details see Running a JProbe Session in the Background Launching the Application This procedure assumes that you have already configured an application as described in Integrating JProbe into Eclipse on page 47 To launch an application with JProbe 1 Click Run JProbe Configurations The JProbe window opens Create manage and run configurations Run a Java application with JProbe analysis B3 En Name Performance Example Diner type fiter text Eclipse Application S O Java Application Main gt 69 Arg
31. as indicated in the Console tab when you launched the application In the Add Snapshots To Project section choose an existing JProbe project for the snapshots captured during this session by selecting its name from the list or define a new one by clicking New JProbe Project Note For details about creating a JProbe project for your snapshots see Creating a Project for JProbe Snapshots on page 29 Click OK The JProbe Console connects to the JProbe Analysis Engine running with the application The runtime session view for the analysis type is displayed In Eclipse check the messages in the Console view Note An empty command window may open You can minimize this window but do not close it as it is required for JProbe to operate correctly The JProbe Connection Manager should now be available for Console connections on the default port 52991 You can now create a JProbe project and attach JProbe to the running session For more information see Attaching JProbe to the Application on page 63 Integrating JProbe to Run Java EE Applications If the TPTP framework Test and Performance Tools Platform is installed in the Eclipse IDE you need to disable the TPTP Profiling for Web Applications feature To disable the TPTP profiling for Web Applications plugin 1 In Eclipse choose Help Software Updates Manage Configurations The Product Configuration dialog box appears Click Show Nested Features to view
32. b you would click in the first row s Action cell and select traces For Eclipse applications only specify any JProbe specific advanced configuration settings for example jp snapshot basename name jb snapshot dir directory path or jp console port 52991 by adding them to the VM arguments text box on the Arguments tab Note These options are specific to JProbe and should be used only when running the application inside Eclipse with JProbe Remove these options from the configuration settings before running the application in debug or run dialog with Eclipse Failing to do so will result in error messages in the Eclipse Console view Click Apply The configuration settings for running your Java SE application with JProbe are saved In the JProbe Configurations dialog box click Run JProbe Your Java SE application is now launched with the JProbe analysis Note For example in the case of JProbe s Network tutorial the Network Simulation dialog box opens JProbe searches for currently running engines and displays this list in the Attach to Running JProbe Session dialog box Integrating JProbe into Eclipse 55 Integrating JProbe to Run Java EE Applications Select an engine from the list of currently running engines or enter in the Host Name IP Address and Port fields the host name and port number of the computer running your application under JProbe Click OK Tip Ensure that the port number is the one that w
33. ber in the Console view You will need it in the next procedure Attaching JProbe to the Application After the application is running you attach JProbe to it and monitor the runtime data You can take snapshots while the session is running To attach JProbe to a running application 1 Ifthe Attach to Running JProbe Session dialog box is not already open click JProbe Attach to Session The Attach to Running JProbe Session dialog box appears 64 JProbe Plugins for Eclipse Guide 2 Attach to Running JProbe Session Select the engine or enter the Host Name and Port Number below the table Name Product User demos memory leakexample LeakExample Memory llupas Host Name IP Address TORO17090 prod quest corp Port 52991 v Add Snapshots To Project We recommend that you add your snapshots to a JProbe project You may want to create one JProbe project for all snapshots or multiple projects for different types of snapshots Press the New JProbe Project button to create a new JProbe project or choose an existing project from the list tutorials v83 v New JProbe Project D Select an engine from the list of currently running engines or enter in the Host Name IP Address and Port fields the host name and port number of the computer running your application under JProbe Click OK Tip Ensure that the port number is the one that was indicated in the Console tab when you launched the
34. ction and displays them on the Browse Software Catalog pane c Select the Sun Java 1 6 or later from the list as recommended in System Requirements on page 14 Installing JProbe Plugins for Eclipse 23 Installing the JProbe Plugins Using Pulse Explorer Pulse Explorer Hello Laura Lupas welcome to Pulse delivering Eclipse how you want it Explorer O X amp Browse Software Catalog Select a software item below and right click for options or drag the software to a profile to add it to the profile Eclipse 3 4 Ganymede v EJ Ready to Use Profiles Sun Java 1 5 Latest or use by Java Developers E Popular Sem Software to have Pulse automatically install a JRE with your profile E Browse Categories E Shared with You A Sun Java 1 6 Latest for use b amp Add on Software eal Browse Categories seal Public Sites we Supporting My Profiles Eclipse3 4Classic_withIProbe E QS My Account amp Store Tips and Tricks lt Summary Details EPIC Votes Aot Available Not Available emp License Binary Code License BCL Sun Micros No further details are available For this item Indude this software in your profile to have Pulse Supporting automatically install a JRE with your profile giving you control aver which JRE is used for launching the Eclipse This catalog contains software that is software useful for development but not Eclipse plugins selected by the Pulse team as items we re
35. e Run Window Help Cis Qa iv i You can now get started with using the JProbe Plugins in Eclipse For a quick overview click JProbe Quick Start Page on the menu bar Launching Eclipse from the Command Line To launch Eclipse with the JProbe plugins from the command line 1 From the command line enter the following commands all on one line c eclipse eclipse vm path to javaw vmargs Xms256m Xmx1024m Djprobe home path to JProbe dir Note Anything after vmargs is passed to the Java VM rather than Eclipse For example c eclipse eclipse vm c Program Files java jdk1 6 0 bin javaw exe vmargs Xms256m Xmx1024m Djprobe home c Program Files JProbe 8 3 When Eclipse launches there is a JProbe menu item on the main menu 2 If you do not see the JProbe menu item use the clean command line option a Exit Eclipse b Edit the command line for Eclipse to include the clean option 20 JProbe Plugins for Eclipse Guide For example c eclipse eclipse clean vm c Program files java jdk1 6 0 bin javaw exe vmargs Xms256m Xmx1024m Djprobe home c Program Files JProbe 8 3 c Launch Eclipse again You can now get started with using the JProbe Plugins in Eclipse For a quick overview click JProbe Quick Start Page on the menu bar Installing the JProbe Plugins Using Pulse Explorer This section presents how to install the JProbe Plugins for Eclipse using the Pulse Explorer To i
36. e View While you are running a Coverage session the runtime browser provides a real time view of test coverage for your application It displays data in terms of hits that is the classes methods and lines of code that were exercised by your test case Vf Coverage Session 3 QuaeuEl Class Hit Methods demos performance diners Diner NENNEN 100 0 demos performance diners Diner 3 I demos performance diners PhilosopherPanel as 7 demos performance diners ChopStick 00008 demos performance diners Philosopher 1 es 50 0 demos performance diners Diner 1 50 0 demos performance diners Diner 2 ST SL demos performance diners Philosopher 5 Show Only Methods with Hit Lines lt 100 w Method Method Hit Hit Lines demos performance diners Philosopher lt init gt demos performance Yes 100 0 demos performance diners Philosopher gotHowManyChopsticksin No T 30 0 demos performance diners Philosopher paint java awt Graphics ves ENN 68 8 demos performance diners Philosopher run No 0 demos performance diners Philosopher start int mo cS 08 demos performance diners Philosopher stop vo L 4 o0 demos performance diners Philosopher whichPhilosopher int Q ves A 100 0 Session Connected The upper table displays a list of classes hit by the test case and shows the percentage of methods that were hit within each class When you select a class the low
37. e the JProbe Plugins for Eclipse If you already have a profile skip this step and continue with step 3 a b In the Add to In the Browse Profile Catalog pane select the desired Eclipse version Drag and drop it over the My Profiles in the Explorer pane My Profiles dialog box specify a name for the new profile you are creating then click OK The new profile s name appears in the Explorer pane under My Profiles Add the JProbe Plugins for Eclipse to your profile a Inthe Explorer pane click Add on Software Browse Categories b Type jprobe in the search field located in the upper right corner of the Pulse Explorer interface and press the Enter key Pulse locates the latest version of the JProbe Plugins for Eclipse on the Quest Web site and displays this software on the Browse Software Catalog pane 22 JProbe Plugins for Eclipse Guide Pulse Explorer Hello Laura Lupas welcome to Pulse delivering Eclipse how you want it probe Explorer O X amp Browse Software Catalog PETREA Select a software item below and right click for options or drag the software to a profile to add it to the profile Ei F3 Ready to Use Profiles E Popular E Browse Categories E Shared with You amp Add on Software ka Browse Categories wa Public Sites ix Supporting My Profiles V Eclipse3 Classic withJProbe i My Account Kf Store Tips and Tricks Summary Details JProbe for Eclipse EPIC Votes
38. e version of GEF that matches the version of your Eclipse installation You may need to scroll down to the Archived Releases section and select the version link 3 Select the link to download the GEF SDK The file name of the zip file should have the form GEF SDK zip 4 Extract the zip file to the parent directory of your Eclipse installation directory For example if Eclipse is installed in C eclipse extract the zip file to CA 16 JProbe Plugins for Eclipse Guide Downloading and Installing JProbe Plugins for Eclipse You can download and install the JProbe Plugins for Eclipse files via any of the following two methods Using the latest jprobe eclipse plugins zip file provided by Quest For details see Installing the JProbe Plugins for Eclipse from the ZIP File on page 16 Using the Update Manager wizard For details see Downloading and Installing Plugins Using the Eclipse Update Manager on page 16 Installing the JProbe Plugins for Eclipse from the ZIP File To install JProbe Plugins for Eclipse from the ZIP file 1 Obtain the jprobe eclipse plugins zip file containing the latest JProbe plugins for Eclipse 2 Doone ofthe following e If your Eclipse installation directory contains a dropins sub directory extract the zip file in that location For example if Eclipse is installed in C eclipse extract the zip file to C eclipse dropins e If your Eclipse installation directory does not contain a dropins sub d
39. ead Memory boolean 0 20 0 480 0 oF byte 0 1 346 o 213 112 0 o char o 4 128 0 248 344 0 0 char L1 o 1 0 40 0 0 demos memory leskexample LeskExample o 1 0 392 0 o demos memory leakexample LeakExamples1 0 1 0 16 0 0 demos memory leakexample LeakExample 2 0 1 o 16 0 0 demos memory ieakexample LeakExample 3 o 1 0 16 0 o double 0 12 0 576 0 0 double o 1 0 80 0 0 float o 8 0 1 240 0 0 int 0 1 610 0 253 160 0 0 int 1 0 6 0 1 000 0 0 int 1D 0 0 1 0 32 0 o java awt AWTEventMulticaster 0 1 0 16 0 o java awt AWTKeyStroke 0 4 0 96 0 0 java awt AWTKeyStroke 0 E 0 80 0 0 java awt AWTKevStroke 111 o 1 D 32 o o v For more detailed information about the data displayed in these views see the section on Exploring the Memory Runtime Summary View in the JProbe User Guide After you have captured the data in a snapshot either manually or by using a trigger you can use the heap investigation tools starting with the Instances view to understand the references among classes in your application For details see Exploring the Instances View in the JProbe User Guide Running a JProbe Analysis in Eclipse 69 Viewing Data in a Runtime Session Performance Session Runtime View While you are running a Performance session the runtime view displays memory pools garbage collection data and threads The information is displayed three tabs Memory Pools GC Data and Threads The Memory Pools and GC Data t
40. ects and command line input This includes Java language source code and examples of file contents Classes objects methods properties constants and events HTML documents tags and attributes Variables Monospace plus italic text represents variable code or command line objects that are replaced by an actual value or parameter Interface Bold text is used for interface options that you select such as menu items as well as keyboard commands Files components and documents Italic text is used to highlight the following items Pathnames file names and programs The names of other documents referenced in this guide About Quest Software Inc Now more than ever organizations need to work smart and improve efficiency Quest Software creates and supports smart systems management products helping our customers solve everyday IT challenges faster and easier Visit www quest com for more information Introduction to This Guide 11 About Quest Software Inc Contacting Quest Software Email info quest com Mail Quest Software Inc World Headquarters 5 Polaris Way Aliso Viejo CA 92656 USA Web site www quest com Refer to our web site for regional and international office information Contacting Quest Support Quest Support is available to customers who have a trial version of a Quest product or who have purchased a commercial version and have a valid maintenance cont
41. ed location When the operation is complete Pulse launches Eclipse Installing JProbe Plugins for Eclipse 25 Installing the JProbe Plugins Using Pulse Explorer e Select a location for the Eclipse workspace then click OK The Eclipse user interface appears The JProbe menu showing on the menu bar indicates that the JProbe Plugins for Eclipse are installed and ready to use 26 JProbe Plugins for Eclipse Guide Getting Started with JProbe Plugins for Eclipse When Eclipse is launched with the JProbe plugins a JProbe perspective is created You work with JProbe snapshots from within this perspective This chapter presents how to set up a JProbe project and import snapshot files This chapter contains the following sections Opening he JProbe Perepectivi 1 tct de die fcrre cin ccce 28 Creating a Project for JProbe Snapshots sssssseseeee nete tenens 29 impoding Heap PT 31 li ite J 33 Creating a Project for the JProbe Demo Code sse 34 Creating and Managing Categories ssssssseeeeeee neret tentent 36 iiy prc o C 44 28 JProbe Plugins for Eclipse Guide Opening the JProbe Perspective For information about perspectives consult the Eclipse online help To open the JProbe perspective 1 Select Window Open Perspective Other 2 Select JProbe O
42. er table shows the names of the methods in the class whether or not the method was hit and the percentage of lines that were hit You can filter this table by percentage of hit lines 72 JProbe Plugins for Eclipse Guide To filter methods in the lower table Select a different percentage from the list The table refreshes to display only those methods that have a percentage of hits below the chosen threshold For more detailed information about the data displayed in the Coverage views see the section on Exploring the Coverage Analysis Views in the JProbe User Guide Viewing the Execution Log When you are running a session you can view the execution log from the session runtime view The same information is also saved to every snapshot taken during the session If you are viewing a snapshot you can open the execution log that was created when the snapshot was taken The following table summarizes the information in the execution log Tab Name Description General Contains information about the JProbe version the application and the environment in which they run For a snapshot it also contains the snapshot name and file size Actual Contains the options that were passed to the JProbe Analysis Engine expressed as command line JProbe options These may be different than the options that were requested in the configuration Requested Contains the options that were set in the configuration expressed as command line
43. eting Categories or Folders To delete a category or folder 1 From the main menu select JProbe Manage Categories 2 Right click the category or folder and choose Delete Managing JProbe Preferences This section presents how to set preferences that affect how JProbe operates and displays data For detailed information refer to the following categories General JProbe Preferences CSV Export Preferences Launch Configuration Preferences Coverage Preferences Memory Preferences Performance Preferences General JProbe Preferences To set the General JProbe Preferences 1 Onthe Eclipse menu bar click Window Preferences 2 Inthe Preferences dialog box click JProbe The general preferences are displayed in the right pane Getting Started with JProbe Plugins for Eclipse 41 Managing JProbe Preferences Show Package Names by default wherever a class name appears in a view the package name is prepended to it Show Method Signatures by default when a method is identified the method signature is appended to it Prompt me whenever I am about to compare snapshots from different applications by default this option is enabled 3 To change any of these default operating settings clear its corresponding check box then click Apply CSV Export Preferences To select whether or not headers are included in the exported data 1 On the Eclipse menu bar click Window Preferences 2 Inthe Preferences dialo
44. ew Project The New Project Select a wizard dialog box appears 2 Select Java Java Project then click Next The New Project Create a Java Project dialog box appears 3 Fill in the Project name text box 4 Select the Create new project in workspace check box and click Next The New Java Project Java Settings dialog box appears 5 Click Finish The Java project is now created Note You can view the newly created project in the Package Explorer view in the Java perspective For details about how to open a Java perspective refer to Eclipse documentation Creating a Java Package To create a Java package 1 In the Java perspective select File gt New gt Package from the menu bar The New Java Package Create a new Java package dialog box appears The Source folder text box is already filled with the name of your Java project src 2 Type the name of your package in the Name text box Note For example to perform JProbe s Network tutorial you need to create two packages and name them demos memory network and demos memory sim 3 Click Finish The Java package is now created Note You can view the newly created package in the Package Explorer view in the Java perspective 50 JProbe Plugins for Eclipse Guide Importing a Java Application into Your Project To import a Java application into your project 1 Select File Import The Import Select dialog box appears Click General gt File System and click
45. g box click JProbe CSV Export The CSV settings are displayed in the right pane Export Column Headings by default this option is enabled 3 To change this default setting clear its corresponding check box then click Apply Launch Configuration Preferences To set the preferences for launching the JProbe configuration files 1 On the Eclipse menu bar click Window Preferences 2 Inthe Preferences dialog box click JProbe Launch Configuration The launch configuration preferences are displayed in the right pane Automatically generate filters from launch configuration settings by default data collection filters are created for your application based on the configuration settings defined Switch to JProbe perspective at launch by default Eclipse switches to the JProbe perspective when you launch an application Open the attach to running JProbe session dialog at launch by default the Attach to JProbe Session dialog box appears when you launch an application with JProbe analysis 42 JProbe Plugins for Eclipse Guide 3 To change any of these default launching settings clear its corresponding check box then click Apply Coverage Preferences To set JProbe preferences specific to a coverage analysis 1 2 On the Eclipse menu bar click Window Preferences In the Preferences dialog box click JProbe Coverage The coverage preferences are displayed in the right pane Filter out Catch Bl
46. hot taker Iu 6 Record Allocations Stack Traces and Garbage Data For All Instances 04 20 08 711 Snapshot taken Snapshot taken Viewing Snapshot Data You can take snapshots at any time while an application is running or you can use triggers to take snapshots A snapshot is always taken when you stop running an 74 JProbe Plugins for Eclipse Guide application in JProbe These snapshots are in the Navigator you can open them and examine the data in several JProbe views To open a snapshot in a JProbe view 1 Right click the snapshot and select JProbe gt Open Snapshot or Double click the snapshot The snapshot data is displayed in the selected view 2 Interact with the view as you would in the JProbe Console For information about the Memory Performance and Coverage views see the JProbe User Guide Index A about JProbe 8 about Quest Software 10 adding categories 36 folders 39 application server creating 56 running with JProbe 59 setting timeout delay 57 testing 57 attaching JProbe to a Java application 63 C categories adding 36 creating and managing 36 deleting 40 editing 39 renaming 40 configuring Eclipse applications in Eclipse 51 Java applications in Eclipse 48 JUnit in Eclipse 53 JUnit Plug in Test in Eclipse 53 OSGi applications in Eclipse 53 contacting Quest 11 creating a project for JProbe snapshots 29 Index 75 application servers 56 categories 36 Eclipse Pl
47. hreads 69 timeout delay setting 57 U Update Manager downloading JProbe Plugins for Eclipse 16 V viewing execution log 72 session history 73 snapshot data 73 viewing data in a runtime session Coverage 71 Memory 65 Performance 69 78 JProbe Plugins for Eclipse Guide
48. i nea te acta eut i RP tic reto uo 36 Adding Folders oii cae RE Rp e a m P e ai n ira er DH tert ve E ae 39 Editing Categories 35 eno Ut REB a deta eat ae ieee 39 Renaming Categories or Folders ssessscssssesssssessessessessessessessecsessessesenssssnseussussuseussussesesssateateaseaeeassansaneansaneaneass 40 Deletirig Categori s or Folders veninne terr net e re rg punc edad a o re ddl 40 Managing JProbe Preferences ccrte rte nee tel e t i ner EA I e RETE DEPT vA Ade 40 General JProbe Preferences deti hte etti eee P ee c red 40 CSV EXport Preferences 3 ce n oaa edu e t t nie eds 41 Eaunch Config ratioriPreferericas eine eee d ee cep i aca eet 41 Coverage Preferentes 2 c ERRORI ERR RUE RR a OU rubus 42 Memory Preterences oio ten a eH RO RERO ERR ECRIRE REN RD UHR ERE ART DONI IRR d 43 Performance Preferences icri in eerie e i cr eer TR cR eH eH M eed 44 Managing Hec 44 Integrating JProbe into Eclipse Integrating JProbe to Run Java SE Applications eseeeee nennen tentent 48 Configuring a Java Application in Eclipse seeeeeente entente 48 Configuring an Eclipse Application in Eclipse seen 51 Configuring JUnit in ECI DSe s cits ERE RE RD EO PUE o EU UE RUD UR ds 53 Configuring JUnit Plug in Test in Eclipse tentent tentent ntn tenentes 53 Configuring an OSGi Application in Eclipse entente 53
49. ication in your system prior to JProbe integration Configuring an OSGi Application in Eclipse Before running an OSGi application with JProbe in Eclipse you need to configure the OSGi application in your environment The configuration process is similar to configuring Eclipse applications in Eclipse For more information see Configuring an Eclipse Application in Eclipse on page 51 This guide assumes that you have already configured your OSGi application in your system prior to JProbe integration 54 JProbe Plugins for Eclipse Guide Launching a Java SE Application with JProbe To launch a Java SE application with JProbe 1 In the JProbe perspective select Run JProbe Configurations The JProbe Configurations dialog box appears In the left pane choose one of the run configurations for your Java SE application Eclipse Application Java Application JUnit JUnit Plug in Test or OSGi Framework The name of the configuration appears in the right pane in the Name text box In the right pane on the JProbe tab choose the type of analysis to be performed while your application runs Memory Performance or Coverage Note For example to perform JProbe s Network tutorial you would choose the Memory check box The lower part of the JProbe tab changes depending on the type of analysis selected Configure additional analysis settings as needed Note For example to perform JProbe s Network tutorial on the Filters ta
50. ication server running on an Eclipse 3 4 or Eclipse IDE for Java EE Development environment 1 In the Servers view right click the name of the server and choose Open The server Overview view opens 2 Inthe Timeouts section set the Start in seconds field to a value between 200 300 seconds the recommended value is 240 sec 3 Integrating JProbe into Eclipse 59 Integrating JProbe to Run Java EE Applications 8 Overview General Information Specify the host name and other common settings Server name Tomcat v6 0 Server at localhost 2 Host name localhost Runtime Environment Apache Tomcat v6 0 v Configuration path IServersiTomcat v6 0 Server at Browse Open launch configuration 7 Server Locations Specify the server path i e catalina base and deploy path Server must be published with no modules present to make changes Server path Set deploy path to the default value currently set Deploy path Server Options Enter settings for the server Serve modules without publishing Publish module contexts to separate XML files Enable security lt Select File gt Save gt Publishing 7 Timeouts Specify the time limit to complete server operations Start in seconds 6 x x Stop in seconds 15 7 Ports Modify the server ports Port Name Port Number x Tomcat admin port 8005 ER HTTP 1 1 8080 apis 8009 gt
51. irectory or if you have had problems with the Eclipse Update Manager in the past then extract the zip file to the parent directory of your Eclipse installation directory For example if Eclipse is installed in C eclipse extract the zip file to CA Downloading and Installing Plugins Using the Eclipse Update Manager This procedure provides a basic overview of using the Eclipse Update Manager to download and install the JProbe Plugins for Eclipse feature For more information about managing features see the Eclipse online help Click Help Help Contents and select Workbench User Guide Tasks Updating features with the update manager Note This procedure applies only to Eclipse 3 5 environments for Windows and Linux To install the plugins using the Eclipse Update Manager 1 Launch Eclipse 2 Click Help Software Updates 3 In the Available Software tab click Add Site 4 In the Add Site dialog box specify the following site information Installing JProbe Plugins for Eclipse 17 Installing the JProbe Plugins in Eclipse Name for example JProbe Location for Eclipse 3 5 type in the following URL http www quest com jprobe Eclipseupdate 35 Click OK The Quest JProbe site is added to the list of sites Eclipse contacts the update site and populates the Quest JProbe entry with the feature that is available from the site Select the check box corresponding to the Quest JProbe update site expand the tree t
52. nch Eclipse You must use a Java 1 6 JRE to run the JProbe plugins for Eclipse For detailed installation instructions see the JProbe Installation Guide The same situation occurs if the dependencies for the JProbe plugins are not met for example if third party plugins like GEF are not installed For a detailed list of system requirements see System Requirements on page 14 30 JProbe Plugins for Eclipse Guide New Project Select a wizard Create a JProbe project Wizards type filter text JS Java Project 3E Java Project from Existing Ant Buildfile Plug in Project General H E cvs Java Probe a Plug in Development amp E Examples Cx e Cee 3 Click Next 4 Provide a name for the project such as Memory New JProbe Project Create a JProbe project Create a JProbe project in the workspace Project name Memory Use default location 5 Provide a location for the project or accept the default location 6 Click Finish The project name appears in the Navigator Getting Started with JProbe Plugins for Eclipse 31 Importing Heap Dumps To create a project for snapshots from the Attach to Running JProbe Session dialog box 1 gt wo N In the Attach to Running JProbe Session dialog box click New JProbe Project Provide a name for the project such as Memory Provide a location for the project or accept the default location Click Finish
53. nd diagnosis in development environments to enable faster delivery of high quality production ready applications Tips and Tricks Sun Java 1 6 Latest or use by Java Developers dem Software to have Pulse automatically install a JRE with your profile Double click here to open the Add on Software catalog and add additional software Summary Details This profile is currently not shared IF you Not Available feel someone else might benefit from the No further details are available for this item time you ve put into creating this profile click the Share Profile button below and you can specify which users are allowed to also use this profile Eclipse3 4Classic withJProbe 6 Right click on the profile name in the Explorer pane and select Edit Launch Arguments 7 Add the following arguments in the VM arguments text box Xms256m Xmx1024m 8 Install your profile then run it as a new instance a Click the icon on the Profile pane s toolbar Pulse validates your profile in the background b Inthe Accept Software Licenses dialog box select the acknowledge and accept ALL of the above licenses check box then click Next c Optional select a location different than the default one for installing the software in your profile Click Configure use the Browse buttons to navigate to the new locations then click Next d Click Install Pulse downloads from the Web the selected software and installs them in the specifi
54. ndow gt Preferences 2 In the Preferences dialog box click JProbe gt Performance The performance preferences are displayed in the right pane Show Percentage Time Values in Methods View Trees defines if the results are displayed in the Methods View as percentages or as actual time values Time Unit defines the unit for measuring time intervals displayed in performance views Nanoseconds Microseconds Milliseconds default option and Seconds Time Precision defines the precision used when calculating the time units displayed in performance views no decimal places default option one two three four or five decimal places e JDBC Truncation Style defines the JDBC truncation method Truncate at the Beginning of Connection and Statement Strings Truncate in the Middle of Connection and Statement Strings or Truncate at the End of Connection and Statement Strings 3 To change the default performance settings select an option button from the lists Managing Licenses Before you can use JProbe you must provide a valid license file JProbe is then unlocked for purchase or evaluation depending on the license file you provide JProbe has four types of licensing models available node locked per seat concurrent and enterprise For more information review the JProbe licensing options on the Quest Web site at http www quest com jprobe licensing_info aspx To define or modify the license file to use with JProbe
55. nformation about what is contained in the JProbe Plugins for Eclipse Guide It also provides information about the JProbe documentation suite and Quest Software This chapter contains the following sections A DOUP E eree ia rsen defienden entities a ders About This Guide JProbe Documentaton DNI coser ier nct ania tren rte d 9 Tos Donventiiig oon mh hen eie o tn CO RR E dd 10 Bboul Quest MWS IMe uioc inni inner init odii cerni ch Pr nn i P ra PP 10 8 JProbe Plugins for Eclipse Guide About JProbe JProbe is an enterprise class Java profiler that provides intelligent diagnostics on memory usage performance and test coverage It allows developers to quickly pinpoint and repair the root cause of application code performance and stability problems that obstruct component and integration integrity JProbe provides three types of analysis Memory analysis allows a developer to identify and resolve Java memory leaks and object cycling to ensure optimal program efficiency and stability Performance analysis allows a developer to identify and resolve Java bottlenecks and deadlocks to ensure optimal program performance and scalability Coverage analysis allows a developer to identify un executed lines of code during unit testing to ensure test coverage and program correctness JProbe also offers an Eclipse plugin that provides intelligent code performance analysis and problem resolution from within the Eclipse Java
56. nstall the JProbe Plugins for Eclipse using the Pulse Explorer Note This procedure assumes that you have already installed the Pulse Explorer to manage multiple Eclipse configurations on your machine You can download and install the Pulse software from the Genuitec Web site www poweredbypulse com 1 Start the Pulse Explorer application The Pulse Explorer graphical user interface appears showing the popular profiles available for use on your machine This information is also displayed by clicking Ready to Use Profiles gt Popular in the Explorer pane Pulse Explorer Hello Laura Lupas wel Explorer is io Eclipse 3 4 Ganymede v amp Ready to Use Profiles St Popular ES Browse Categories E Shared with You amp Add on Software eal Browse Categories eet Public Sites eal Supporting My Profiles ji My Account Store Tips and Tricks Popular This catalog contains pre configured profiles that are recommended for use based on popularity and other metrics When getting started with software delivered by Pulse this catalog is a great place to start Installing JProbe Plugins for Eclipse 21 Installing the JProbe Plugins Using Pulse Explorer come to Pulse delivering Eclipse how you want it 4x 0 Select one of the popular profiles below and right click For options or drag the profile to your My Profiles view to make it available For you Eclipse 3 4 Classic for
57. o PerformaSure Quest Central Quest vToolkit Quest vWorkSpace ReportADmin RestoreADmin SelfServiceADmin SharePlex Sitraka SmartAlarm Spotlight SQL LiteSpeed SQL Navigator SQL Watch SQLab Stat StealthCollect Storage Horizon Tag and Follow Toad T O A D Toad World vAutomator vControl vConverter vFoglight vOptimizer Pro vPackager vRanger vRanger Pro vSpotlight vStream vToad Vintela Virtual DBA VizionCore Vizioncore vAutomation Suite Vizioncore vBackup Vizioncore vEssentials Vizioncore vMigrator Vizioncore vReplicator Vizioncore vTraffic Vizioncore vWorkflow WebDefender Webthority Xaffire and XRT are trademarks and registered trademarks of Quest Software Inc in the United States of America and other countries Other trademarks and registered trademarks used in this guide are property of their respective owners Disclaimer The information in this document is provided in connection with Quest products No license express or implied by estoppel or otherwise to any intellectual property right is granted by this document or in connection with the sale of Quest products EXCEPT AS SET FORTH IN QUEST S TERMS AND CONDITIONS AS SPECIFIED IN THE LICENSE AGREEMENT FOR THIS PRODUCT QUEST ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMEN
58. o see that the feature is also selected then click Install In the Install wizard review the installation settings and click Next Review and accept the license agreements and click Finish Eclipse installs the required software and upon completion prompts you to restart your environment Some versions of Eclipse may not correctly set up the JProbe settings in eclipse ini Therefore you need to modify this file before restarting Eclipse Click No then close Eclipse To use JProbe Plugins for Eclipse you need to launch Eclipse with some command line options For more information see Launching Eclipse with JProbe Plugins for Eclipse on page 18 18 JProbe Plugins for Eclipse Guide Launching Eclipse with JProbe Plugins for Eclipse You can launch JProbe Plugins for Eclipse either by editing the eclipse ini file or from the command line Regardless of the method you need to launch Eclipse with the following options vm Set to Sun JRE 6 or any update to JRE 6 vmargs Set the heap size Xms256m Xmx1024m Djprobe home Set to your JProbe installation directory JProbe plugins use this setting to locate the JProbe Analysis Engine and to access JProbe licensing Note This setting is not required if you installed JProbe via the Eclipse 3 5 Update Manager Tip On Windows you can create or edit an Eclipse shortcut to include these options Create a shortcut as usual and name it something like Launch Eclipse
59. ocks by default all catch blocks are included in the metrics calculated Missed Lines Color sets default color for any missed line Missed Conditions Color sets default color for any missed condition No Data for Line Color sets default color for cases when no data is available for a line Filtered Catch Block Color sets default color for the catch blocks filtered out To change these default coverage settings see sections Filter Out Catch Blocks and Customizing Colors Used to Display Results Filter Out Catch Blocks The data for catch blocks is included in the following metrics Missed Lines Missed Lines Total Lines Missed Conditions Missed Conditions Total Conditions Catch blocks however are often impossible to test If you choose not to test them you may find it easier to interpret your results without the catch block data inflating the missed values You can set a filter to remove the data from the calculations Getting Started with JProbe Plugins for Eclipse 43 Managing JProbe Preferences To remove catch block data from calculations In the Coverage Preferences pane clear the Filter out Catch Blocks check box Exceptions Although it is not generally considered good coding practice it is possible that a line can have both normal statements and catch block statements Catch block filters do not apply in the followings situations Try and catch appear in the same line of code
60. pen Perspective ea CVS Repository Exploring 3 Debug amp Java default Gd Java Browsing J pe Hierarchy ug in Petelopment m UD Resource E Team Synchronizing Cancel 3 Click OK JProbe is displayed in the title bar and on the perspective shortcut bar JProbe Eclipse SDK Navigate Search Project JProbe Run Window Help Q ig E Probe G Java TS Navigator 3 H ce Ege Getting Started with JProbe Plugins for Eclipse 29 Creating a Project for JProbe Snapshots To return to the JProbe perspective after navigating away from it If JProbe is on the shortcut bar click ES Pro Java JProbe e Otherwise click E Open Perspective and select Other JProbe then click OK Creating a Project for JProbe Snapshots You may want to create one project for all snapshots or multiple projects for different types of snapshots Use one of the following methods depending on your project needs Tocreate a project for snapshots using the JProbe wizard Tocreate a project for snapshots from the Attach to Running JProbe Session dialog box To create a project for snapshots using the JProbe wizard 1 In the JProbe perspective select File gt New gt Project 2 Select JProbe JProbe Project Note Ifthe JProbe perspective and menu are visible but the JProbe project type is not available check the JProbe menu If it contains only the Quick Start Page item please check the JRE version you used to lau
61. ract Quest Support provides around the clock coverage with SupportLink our web self service Visit SupportLink at http support quest com From SupportLink you can do the following Quickly find thousands of solutions Knowledgebase articles documents Download patches and upgrades Seek help from a Support engineer Log and update your case and check its status View the Global Support Guide for a detailed explanation of support programs online services contact information and policy and procedures The guide is available at http support quest com pdfs Global Support Guide pdf Quest Communities Get the latest product information find helpful resources and join a discussion with the JProbe Quest team and other community members Join the JProbe community at http jprobe inside quest com 12 JProbe Plugins for Eclipse Guide Installing JProbe Plugins for Eclipse This chapter describes how to install JProbe Plugins for Eclipse and how to launch Eclipse with the plugins This chapter contains the following sections System Regie M nnm hidan it n tlt rrt rr rri Rhe bra Rec 14 Installing the JProbe Plugins in Eclipse Installing the JProbe Plugins Using Pulse Explorer nnn 20 14 JProbe Plugins for Eclipse Guide System Requirements JProbe Plugins for Eclipse require the following environment Eclipse 3 3 2 3 4 x or 3 5 Sun JRE 6 or any update to JRE 6 Graphical
62. rt IBM PHD Dump Import IBM PHD Dump No folder specified Select File C Templheapdump 2006 1201 131636 23101 phd Browse Enter or select the parent folder 1 amp DinerExample Performance Snapshots E E Probe Demos E LeakExample Memory Snapshot Memory Snapshot Name heapdump 20061201 131636 23101 jph 5 Click Browse and navigate to the heap dump file that you want to open Getting Started with JProbe Plugins for Eclipse 33 Importing Snapshots 6 Click Open then Finish The heap dump file is converted to a JProbe snapshot and listed in the Navigator Importing Snapshots You may want to import JProbe snapshots from the standalone JProbe console from JProbe s automation tools or from another developer who is using JProbe The JProbe project is the default folder into which you import snapshots You may want to create a separate JProbe project for imported snapshots To import snapshots 1 Inthe Navigator select the JProbe project that you created 2 Click File gt Import 3 Select General gt File System Import Select Import resources from the local file system into an existing project Select an import source type Filter text E General E Archive File e Breakpoints i Existing Projects into Workspace amp E Preferences i E Cus E C Probe Uf Import Binary HPROF Dump 4 Import IBM PHD Dump Uf Import IBM Text Dump Uf Import Text HPRO
63. rval from the Pools and GC Interval list GC Data The upper pane of the GC Data tab displays garbage collections in chart form showing which collector was invoked and how many times it was invoked The lower pane summarizes this along with how much time each collector spent The Garbage Collection Overhead value indicates the percentage of time that the JVM was exclusively performing garbage collection compared to the elapsed time the program has been running 68 JProbe Plugins for Eclipse Guide Memory Pools GC Data Heap Data Garbage Collections Count x Collectors BlCopy BlMarkSweepCompact Q 02 13 15 02 13 25 02 13 35 02 13 45 02 13 55 02 14 05 02 14 15 Garbage Collection Overhead 0 0 Normal Collector Count Time ms Cumulative Count Cumulative Time ms Copy 0 0 00 6 24 00 MarkSweepCompact 0 0 00 2 138 00 Heap Data The Heap Data tab displays the same types of information as the Instances view It is populated when you click the Refresh Runtime Data button Memory Pools GC Data Heap Data Investigate by Heap Count x Click on chart segments or legend items to drilldown on categories Categories Java Base Libraries Primitive Arrays BlJava UI Tookits ElOther Java SE sun Elother M M 0 10 20 30 40 50 60 70 80 30 100 Name Use Case Count Heap Count Use Case Memory Heap Memory Dead Count D
64. rver Type the server name in the Server name text box and click Next Follow the instructions in the wizard to specify the details of the server that you want to create This information is specific to the selected server In the Add and Remove Projects dialog box modify the projects that are configured on this server The new server is now created and appears in the Server column in the Servers view Integrating JProbe into Eclipse 57 Integrating JProbe to Run Java EE Applications Testing the Application Server After creating an application server it is a good idea to check that it starts and stops correctly To test the server in Eclipse 1 In the Servers view right click the name of the server and choose Start The server starts within Eclipse and the new status Started is displayed in the State column The Console view shows details about the status of the processes executed For some application servers an additional window opens Closing this window does not stop the server which continues to run in the background 2 Inthe Servers view right click the name of the running server and choose Stop The server is stopped and its new status Stopped is displayed in the State column The Console view shows details about the status of the processes executed Setting the Server Timeout Delay A Java EE application can run correctly with JProbe in Eclipse only when the timeout delay of the application server has been
65. shot Data on page 73 Creating a Project for the JProbe Demo Code A set of JProbe tutorials and demo applications are available via the JProbe community http jprobe inside quest com If you want to view in Eclipse the snapshots that you took while working through a tutorial you should create a project in Eclipse for the demo code so that Eclipse can find the demo code and display source code in the Source view Getting Started with JProbe Plugins for Eclipse 35 Creating a Project for the JProbe Demo Code To create a project for demo code 1 a 2 Cc N Select File New Project Select Java Project and click Next Provide a name for the project such as JProbe Demos Under Contents select Create project from existing source From the Directory field browse to your JProbe installation directory for example C Program Files JProbe 8 3 New Java Project Create a Java project Create a Java project in the workspace or in an external location Project name JProbe Demos Contents O Create new project in workspace Create project from existing source Directory C Program Files JProbe EE E Project layout Working sets Add project to working sets The wizard will automatically configure the JRE and the project layout based on the specified existing source Next gt Finish Cancel Click Finish You may be prompted to switch to the Java perspective If so
66. sure you wil find engaging Whether open source free software or software you may want to consider purchasing this list is a great place to start For high quality Eclipse components d Add the JRE to your profile by dragging and dropping the Sun Java 1 6 Latest option over your profile in the Explorer pane e Click OK in the confirmation dialog box that appears at the end of the operation 5 Review your profile by clicking its name in the Explorer pane The Profile pane displays the base and personal software added to your profile 24 JProbe Plugins for Eclipse Guide Pulse Explorer Hello Laura Lupas welcome to Pulse delivering Eclipse how you want it Explorer X 6 amp Profile Eclipse3 4Classic_withJProbe 8 EE J Explore the software you have added to the profile or go to the Add on Software catalog to find additional software t Ready to Use Profiles EA Popular E Browse Categories amp Shared with You E Eclipse Platform and SDK for use by Anyone amp 6 Add on Software Optimized for Eclipse 3 4 Classic lust Browse Categories ual Public Sites sal Supporting My Profiles A Eclinse3 4Classic_withiProbe Personal software My Account Base software Pulse Services and Extensions for use by Anyone Optimized for Eclipse 3 4 Classic s s seo JProbe for Eclipse for use by Java Developers e JProbe is an enterprise class Java profiler used For intelligent code performance analysis a
67. ted in the following table Group Thread State Thread Description 70 JProbe Plugins for Eclipse Guide Runnable RUNNABLE A thread executing in the Java virtual machine Waiting TIMED WAITING A thread that is waiting for another thread to perform an action for up to a specified waiting time WAITING A thread that is waiting indefinitely for another thread to perform a particular action Blocked BLOCKED A thread that is blocked waiting for a monitor lock Other NEW A thread that has not started yet TERMINATED A thread that has exited Clicking on a bar or a line in the legend reduces the list of threads in the lower pane so that only threads in that group are displayed You can return to the full list by clicking the Show All button The total number of threads is displayed beneath the graph along with the time the graph was last updated Historical data is not maintained for the graph The lower pane displays a list of all known threads grouped into categories This list is sorted in ascending order threads followed by categories When you click a thread on the list details for the selected thread are displayed on the right pane including Name of the thread Thread state The object upon which the thread is blocked when applicable The thread that owns the object that the thread is blocked when applicable Stack trace of the thread List of object monitors locked by
68. the thread List of synchronizers locked by the thread You can reduce the list by clicking a bar in the graph or by typing a filter into the Filter Threads field The filter is a simple string filter that matches against thread names not category names Categories can be expanded by right clicking on them and selecting Expand Category Threads can be collapsed back into categories by right clicking on them and selecting Collapse Category Running a JProbe Analysis in Eclipse 71 Viewing Data in a Runtime Session Thread details are only updated on demand Users can update the details for the currently selected thread by pressing the Update Thread Details button or by double clicking a thread name The button is disabled when no threads are selected or a category is selected You can detect deadlocks on demand by pressing the Detect Deadlock button If a deadlock is detected the threads list displays the threads involved in the deadlock If no deadlock is detected a message is displayed to that effect For more detailed information about the data displayed in the Performance runtime views see the section on Exploring the Performance Runtime Summary View in the JProbe User Guide After you capture the data in a snapshot you can use the performance investigation tools starting with the Call Graph and Call Tree to understand the performance issues in your program For details see the JProbe User Guide Coverage Session Runtim
69. ting Started with JProbe Plugins for Eclipse 37 Creating and Managing Categories Enter a name in the Name field To add packages to this category double click the cell and enter the package name The package is displayed in the cell and the Action is set to Include To exclude some code from this category enter the package class or method no signature in the cell and set the Action to Exclude For details about filters see Syntax for Filters on page 37 To add existing folders or categories to this category select the folder or category and click the Include button Note Order is important Filters lower in the table override filters defined higher in the table If you need to rearrange the filters click and hold the row button for the filter you want to move and drag it to its new location Right click a row button to insert or delete a row Click Apply Repeat to create additional categories Click OK Syntax for Filters Filters are case sensitive and blank spaces are not allowed You can use an asterisk as a wild card it matches any character including the package separator If you specify the code in a shorthand or partial form JProbe automatically changes it to canonical form The change may not be exactly what you desire so be sure to verify it JProbe does not check to see whether the filter actually matches anything in your code For example if you make a typing error in your package name nothing in yo
70. try Thread sleep 1000 catch Exception e If Thread sleep 1000 is executed coverage is 100 if not coverage is 0 e Executed code and catch appear in the same line of code try System out print obj toString System out println catch Exception e System exit 1 If System out print is executed the coverage is 100 regardless of whether or not it throws an exception Customizing Colors Used to Display Results You can change the colors used to represent hit lines missed lines missed conditions catch blocks that have been filtered out and unexecuted code To set colors 1 Inthe Coverage Preferences pane click the color beside the preference s name 2 Inthe Color dialog box select a new color and then click OK The selected color is now displayed in the Coverage Preferences pane Memory Preferences To set JProbe preferences specific to a memory analysis 1 On the Eclipse menu bar click Window gt Preferences 2 Inthe Preferences dialog box click JProbe Memory The memory preferences are displayed in the right pane 44 JProbe Plugins for Eclipse Guide Memory Unit defines the unit for measuring heap data displayed in memory views Bytes default option Kilobytes and Megabytes 3 To change the default memory settings select an option button from the list Performance Preferences To set JProbe preferences specific to a performance analysis 1 On the Eclipse menu bar click Wi
71. ug in project 51 Eclipse Plug in run configuration 52 Java package 49 Java project 49 Java run configuration 50 D deleting categories 40 folders 40 documentation core 9 feedback 9 suite 9 downloading JProbe Plugins for Eclipse 16 downloading plugins from the ZIP file 16 using the Update Manager 16 E Eclipse applications configuring in Eclipse 51 creating an Eclipse Plug in project 51 creating Eclipse Plug in run configuration 52 editing categories 39 execution log viewing 72 76 JProbe Plugins for Eclipse Guide F filters syntax 37 folders adding 39 deleting 40 renaming 40 G GC Data 67 GEF plugin 15 Graphical Editing Framework plugin 15 H Heap Data 68 heap dumps importing 31 importing heap dumps 31 Java application in your project 50 snapshots 33 installing GEF plugin 15 JProbe Plugins for Eclipse generic Eclipse users 14 Pulse users 20 integrating JProbe for running Java EE applications 55 for running Java SE applications 48 into Eclipse 47 J Java application attaching JProbe to a 63 configuring in Eclipse 48 creating a Java package 49 creating a Java project 49 creating run time configuration 50 importing in your project 50 launching with JProbe in Eclipse 62 running with JProbe in Eclipse 62 Java SE applications launching with JProbe 54 JProbe analysis running in Eclipse 61 JProbe community 11 JProbe integration for running Java EE applications 55 for running Java
72. uments m JRE YA JProbe lt p Classpath Hy Source 2 Project 3 Performance Example Diner Ju Unit Main dass JU JUnit Plug in Test demos performance diners Diner P OSGi Framework Include system libraries when searching for a main dass Include inherited mains when searching for a main class Stop in main lt Filter matched 7 of 7 items Run JProbe 2 In the left pane select the application that you want to run Running a JProbe Analysis in Eclipse 63 Running a Java Application with JProbe in Eclipse The text boxes in the Main tab are populated with the project name and main class 3 If you want to make any changes to this configuration click the JProbe tab 9 Main 69 Arguments E JRE JProbe Classpath 5 Source FB Environment E Common JProbe Analysis Type O Memory S Performance O Coverage A General A Filters Automation Timing o cru O Elapsed JDBC Component Instrumentation v Enable JDBC component instrumentation Select JDBC components For instrumentation com arjuna config com bea config 3 com ddtek config com evermind config com ibm config com informix config com microsoft config com mvsal confia XJ SI ST ST STIKT S Run JProbe Close 4 Click Run JProbe The application starts and the Console view appears Note Take note of the port num
73. ur code will match the filter and so the filter is not effective The following table contains common syntax and describes how JProbe interprets it If you type this Canonical form is And filters are applied to this All methods in all classes in all packages including the unnamed package Fee AII methods in all classes in the unnamed package only 38 JProbe Plugins for Eclipse Guide If you type this M P String P C do Pre Canonical form is this we C ERASMI P String no change oPre gg PoS YT And filters are applied to All methods in classes named C in any package All methods in the class named C in the unnamed package only Method M in all classes in all packages All methods in any class in the package P whose name starts with String and all methods in any class in a package or subpackage of P String matches both P StringArt draw and P Stringent Check English spelling Any method whose name starts with do in any class named C in any subpackage of P except P directly matches P SubPkg C doGet but does not match P C doNotMatch All methods in all classes starting with Pre in any package as well as any class in a subpackage whose name starts with Pre matches both Pkg Prepare m and Pkg Pretend C m All methods in classes whose name ends with y and either starts with s or belongs to a subpackage that starts with s
74. with JProbe Right click the shortcut and select Properties Edit the Target field to include the command line options Launching Eclipse by Editing the INI File The options in the ECLIPSE HOMET eclipse ini text file control the Eclipse startup This file contains command line options that are added to the command line when Eclipse is started If ECLIPSE HOME is not defined the default eclipse ini file in the Eclipse installation directory is used Note the following Each option and each argument to an option must be on its own line Alllines after vmargs are passed as arguments to the Java VM so all arguments and options for Eclipse must be specified before vmargs To launch Eclipse with the JProbe plugins by editing the ini file 1 Open the eclipse ini file in a text editor 2 Add or update the following options and arguments y Installing JProbe Plugins for Eclipse 19 Installing the JProbe Plugins in Eclipse C Program Files lt java_home gt bin javaw vmargs Xms256m Xmx1024m Djprobe home jprobe home Note This setting is not required if you installed JProbe via the Eclipse 3 5 Update Manager Save the file and start Eclipse as usual A JProbe menu item appears on the main menu Tip Ifthe JProbe menu does not appear on the menu bar use the clean command line option described in Launching Eclipse from the Command Line on page 19 JProbe Eclipse SDK 3E Edit Navigate Search Project JProb
75. you clicked Finish in step 5 the JProbe Connection Manager should now be available for console connections on the default port 52991 With the exception of the Apache Tomcat server all servers supported by JProbe use jplauncher exe to start the application server and have three Console views associated with the process javaw exe which displays the version of Java executable e jplauncher exe which displays the port number available for the JProbe Connection Manager e JProbe Server Plugin Output which allows you to monitor the output debug messages of JProbe server plugin If you are running a Tomcat server with JProbe two Console views can be opened javaw exe which displays the port number available for the JProbe Connection Manager e JProbe Server Plugin Output which allows you to monitor the output debug messages of JProbe server plugin When multiple views are available to display choose the Console of interest from the Display Selected Console list or icon on the lower toolbar You can now create a JProbe project and attach JProbe to the running session For more information see Attaching JProbe to the Application on page 63 4 Running a JProbe Analysis in Eclipse This chapter describes how to run your Java application with JProbe in Eclipse which allows you to identify problems with your application and investigate those problems You can then improve your code using the Eclipse development environment

Download Pdf Manuals

image

Related Search

Related Contents

Manual para la utilización de presentaciones electrónicas  HRMS – Employee Module: User Manual  User Manual VRvision  HO H16-44 Quick Start Manual  ROCKY ROCKY-SD  

Copyright © All rights reserved.
Failed to retrieve file