Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After launching JProfiler, the JProfiler Quick Start dialog appears.

NexawebImage RemovedImage Added

1. Click An application on a remote computer radio button and click Next.
    Note: This choice allows you to run any type of application from a Browser, Nexaweb Studio or a
              command line.
    The Where is profiled application located? dialog appears.

NexawebImage RemovedImage Added

2. Click On this computer radio button and click Next.
    The Choose JVM Version . . . dialog appears.

 NexawebImage RemovedImage Added

3. Select the JVM version running on your system and click Next.
    The Choose the port used for profiling connection dialog appears.

NexawebImage RemovedImage Added

4. Click Next to accept the default.
    The Choose whether to wait for the JProfiler GUI dialog appears.

NexawebImage RemovedImage Added

5. Click Next to accept the default.
    The Perform required modifications dialog appears.

NexawebImage RemovedImage Added

6. Modify the Java start command to include the syntax specified in the
    Perform required modifications dialog.

...

    Click Next.
    The Finished dialog appears.

NexawebImage RemovedImage Added

7. Select whether to start a session now or later and click Finish

...

b. Click + to expand Java and select Installed JREs.

NexawebImage RemovedImage Added

c. Select Nexaweb Studio from Installed JREs list and click Edit.
    The Edit JRE dialog appears.

NexawebImage RemovedImage Added

d. Enter the JProfiler command syntax (specified on the Perform required modifications dialog) in the
    Default VM Arguments field.

...

b. Double click on Java.
    The Java Control Panel opens.

NexawebImage RemovedImage Added

c. Click Java Tab.

NexawebImage RemovedImage Added

d. Click View for Java Applet Runtime Settings.
    A list of Java runtime settings for the JREs installed on your system appears.

NexawebImage RemovedImage Added

e. Click in the JavaRuntime Parameters field beside the JRE to use and enter the information specified on
    the JProfiler Perform required modifications dialog in this field. For example, enter: 
    -agentlib:jprofilerti=port=8849  "-Xbootclasspath/a:C:\Program Files\jprofiler5\bin\agent.jar"

...

1. If you selected to start a session after configuring JProfiler, the Session Startup dialog appears.
    Otherwise, select Session > Open Session.  An Open Session dialog appears.
    Select Remote application on local host and click Open. The Session Startup dialog appears.
    Note: If using an evaluation copy of JProfiler, an evaluation dialog appears.
              Click Evaluate to get to the Session Startup dialog.

NexawebImage RemovedImage Added

2. Click OK.
    A Connection status dialog appears.

NexawebImage RemovedImage Added

3. Start the application that you want to profile.

4. Click VM Telemetry Views on the left of JProfiler. Then click the Memory tab at the bottom, if not
    already selected.

NexawebImage RemovedImage Added

5. Use the application and watch the application performance in JProfiler. 

The following graph shows an application with a memory leak.

NexawebImage RemovedImage Added

Identifying Memory Leak Source

1.Image Added Click Nexaweb to cause the JVM to start collecting objects.

2. Click Memory Views.

Image Added
NexawebImage Removed   

3. Filter the view to display Nexaweb objects only; enter: com.nexaweb in the filters field and 
    press the Return key.

NexawebImage RemovedImage Added

4. Select View > Mark Current Values.
    This causes JProfiler to remember all classes and number of instances of each in the application. 
    In addition, it adds a Difference column to the Memory view.

NexawebImage RemovedImage Added

5. Click Nexaweb to cause the JVM to start collecting objects.

...

7. Select an object with values in the Difference column and then click NexawebImage Removed Image Added.
    JProfile displays a dialog prompting you to discard the current snaphsot, if one has already been taken,
    click OK.
    JProfiler displays a dialog prompting you to select options for the snapshot.

NexawebImage RemovedImage Added

8. Click Remove weakly referenced objects check box and click OK.

9. Double-click the object.
    A New Object Set dialog appears.

NexawebImage RemovedImage Added

10. Click References radio button and click OK.
      JProfiler displays a Reference graph.

NexawebImage RemovedImage Added

11. Right click on an object and select Show Paths to GC Root.
      A Path to GC Roots options dialog appears.

Image Added

NexawebImage Removed 

12. Click Single root radio button and then click OK.
      This locates and displays the link from a GC root object, a permanent object in memory that
      is not released, to this object.    

NexawebImage RemovedImage Added

The GC root appears in yellow.

13. Follow path from selected object to GC root and look for collections, which appear with [] in the title 
     similar to the following:

NexawebImage RemovedImage Added

Collections typically are arrays or hash tables. These are most likely objects causing memory leaks, as the application puts objects in collections and then forgets about the collections. However, since the collection is referenced it cannot be destroyed.

...