Getting Started with Using JDeveloper's Memory Profiler tool

This is a guest post from my coworker Jeanne Waldman.

This blog will explain in pictures and a little text how to run JDeveloper's Memory Profiler tool using JDeveloper 11.1.1.2.0.

In this example we have an application named Sprinkles. We want to run the weatherForecast.jspx page that is apart of the ViewController project. We want to profile some of the org.apache.myfaces.trinidad classes. We will begin a usecase when we run the weatherForecast.jspx page, and we'll end the usecase when the jspx page finishes rendering. When we stop the usecase, the profiler results will be displayed.

The Memory Profiler Results

The Memory Profiler results screen looks like this. Read on for the steps to take to get these results. 

memoryProfilerInformation.png





First Step - Set the Default Run Target in Project Properties

Open the Project Properties.

Then click on Run/Debug/Profile, then the Edit button.

In this dialog, you can set your Default Run Target. This is the file that is the starting point when you run your application.

Here we set the weatherForecast.jspx page as our default run target.

RunDebugProfile.png





















Step 2: Set the Profiler Information

In the Stack Filter, we enter the name of the two classes on which we would like to filter our profiler results.Data is collected only for stack levels whose class name passes the filter.

We leave the "Connect on Application Startup" and "Begin Use Case on Application Startup" checked. This way the profiler data will start to be collected when we run the application, which is set to run the weatherForecast.jspx file by default. We will end the data collection manually when we click the 'End Usecase' button (to come a few steps later).

profiler.png
























Step 3: Filter Your Results

The  "Collect 'new' and G.C. data" checkbox is checked by default. This displays objects that were created, but not garbage collected, thereby displaying a potential memory leak.

The "Class Filter" field is where we filter the profiler results. The profiler filters all other classes and only those that contain the name you have entered in the string are displayed. 

memoryProfilerDialog.png





















Step 4: Start Profiling!

To begin profiling, go to the menu and click Run -> Memory Profile ViewController.jpr (ViewController is the name of the project in this example)

This will run the weatherForecast.jspx page and start collecting the profiling information.

runMemoryProfile.png


Step 5: Stop Profiling

You can press the Show Updates button whenever you want to see the results. In our example, we press the 'End Use Case' button to stop the profiler from collecting data and to display the results. 

EndUseCase.png

The Results:

Here are the results. You can see that only the classes that you filtered in the Memory Class Filter field are shown. If you leave the Memory "Class Filter" field blank you will see a lot more information.

memoryProfilerInformation.png

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

An exploration in the lighter side of ADF development.

Search

Archives
« September 2015
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today