|
Lines 57-63
Link Here
|
| 57 |
<li>The tree pane displays data collectors at root level and analysis types |
57 |
<li>The tree pane displays data collectors at root level and analysis types |
| 58 |
as the children of the data collector. Expand the 'Java Profiling' data |
58 |
as the children of the data collector. Expand the 'Java Profiling' data |
| 59 |
collector and notice the analysis types that fall under it (for example: |
59 |
collector and notice the analysis types that fall under it (for example: |
| 60 |
'Basic Memory Analysis', 'Execution Time Analysis', and so on...). <br> |
60 |
'Execution Time Analysis', 'Probe Insertion', and so on...). <br> |
| 61 |
Select the analysis types that you are interested in under the 'Java |
61 |
Select the analysis types that you are interested in under the 'Java |
| 62 |
Profiling' data collector. The features supported for profiling Java 1.5 and |
62 |
Profiling' data collector. The features supported for profiling Java 1.5 and |
| 63 |
Java 1.4 based java virtual machines are described below. |
63 |
Java 1.4 based java virtual machines are described below. |
|
Lines 82-91
Link Here
|
| 82 |
the JVMPI-based Profiler. Instead of relying on VM-generated events for |
82 |
the JVMPI-based Profiler. Instead of relying on VM-generated events for |
| 83 |
monitoring application behavior (such as method entry and exit events, |
83 |
monitoring application behavior (such as method entry and exit events, |
| 84 |
object allocations and so on) it uses Byte Code Instrumentation (BCI) to |
84 |
object allocations and so on) it uses Byte Code Instrumentation (BCI) to |
| 85 |
inject small pieces of code which tracks the application execution. This |
85 |
inject small pieces of code which track the application execution. This |
| 86 |
technique allows for efficient monitoring of specific parts of the |
86 |
technique allows for efficient monitoring of specific parts of the |
| 87 |
application, without imposing a noticeable overhead on other parts of the |
87 |
application, without imposing a noticeable overhead on other parts of the |
| 88 |
application that are not being monitored. This approach is easy to use and |
88 |
application that are not being monitored. This approach is easy to use |
| 89 |
and scales well for large applications. </p> |
89 |
and scales well for large applications. </p> |
| 90 |
<h3>Execution Profile of an Application</h3> |
90 |
<h3>Execution Profile of an Application</h3> |
| 91 |
<p>The Java profiler can be used to profile any Eclipse Plugins, Eclipse RCP |
91 |
<p>The Java profiler can be used to profile any Eclipse Plugins, Eclipse RCP |
|
Lines 94-155
Link Here
|
| 94 |
(see <a href="#Profile_Drop_Down_Menu_">Figure</a>). This opens the profile |
94 |
(see <a href="#Profile_Drop_Down_Menu_">Figure</a>). This opens the profile |
| 95 |
launch configuration window. </p> |
95 |
launch configuration window. </p> |
| 96 |
<blockquote> |
96 |
<blockquote> |
|
|
97 |
<p><b><a name="Profile_Drop_Down_Menu_">Profile Drop Down Menu</a></b><br> |
| 97 |
<p><img src="../images/img_prof_dr_dn.png" border="0"><br> |
98 |
<p><img src="../images/img_prof_dr_dn.png" border="0"><br> |
| 98 |
<br> |
99 |
</p> |
| 99 |
<b><a name="Profile_Drop_Down_Menu_">Profile Drop Down Menu</a></b></p> |
|
|
| 100 |
</blockquote> |
100 |
</blockquote> |
| 101 |
<p> <br> |
101 |
<p> <br> |
| 102 |
Perform the following steps: |
102 |
Perform the following steps: |
| 103 |
<ul> |
103 |
<ul> |
| 104 |
<li>Create a new launch item of type "Java Application". |
104 |
<li>Create a new launch item of type "Java Application". |
| 105 |
</li> |
105 |
</li> |
| 106 |
<li>Select the "Monitor" tab as shown in |
106 |
<li>Select the "Monitor" tab from the profile launch configuration. |
|
|
107 |
<li>Select "Execution Time Analysis", as shown in |
| 107 |
<a href="#The_Profile_Launch_Configuration_">Figure</a>. <br> |
108 |
<a href="#The_Profile_Launch_Configuration_">Figure</a>. <br> |
| 108 |
<br> |
109 |
<br> |
|
|
110 |
<p><b><a name="The_Profile_Launch_Configuration_">The Profile Launch |
| 111 |
Configuration</a></b><br> |
| 109 |
<img src="../images/img_prof_launch.png" border="0"><br> |
112 |
<img src="../images/img_prof_launch.png" border="0"><br> |
| 110 |
<br> |
113 |
<br> |
| 111 |
<b><a name="The_Profile_Launch_Configuration_">The Profile Launch |
114 |
</p> |
| 112 |
Configuration</a></b><br> |
|
|
| 113 |
</li> |
115 |
</li> |
|
|
116 |
<li>Click on <b>Edit Options</b> to set any desired filter. |
| 117 |
</li> |
| 114 |
</ul> |
118 |
</ul> |
| 115 |
<h3>Object allocation analysis</h3> |
119 |
<h3>Memory (Object allocation) analysis</h3> |
| 116 |
<p>To perform a Object Allocation analysis or Memory analysis (Heap) profile |
120 |
<p>To perform an Object Allocation analysis or Memory analysis (Heap), perform the following steps: |
| 117 |
your application, select "Profile" from the Profile drop down menu (see |
|
|
| 118 |
<a href="#img_prof_launch">Figure</a>). </p> |
| 119 |
<p> <br> |
| 120 |
Perform the following steps: |
| 121 |
<ul> |
121 |
<ul> |
| 122 |
<li>Select the "Monitor" tab as shown in |
122 |
<li>Profile your application by selecting "Profile" from the Profile drop down menu (see |
| 123 |
<a href="#Profile_Drop_Down_Menu_">Figure</a>. |
123 |
<a href="#Profile_Drop_Down_Menu_">Figure</a>). </li> |
| 124 |
</li> |
124 |
<li>Select the "Monitor" tab from the profile launch configuration.</a>. |
| 125 |
<li>Click on Edit options to set any desired filter. |
|
|
| 126 |
</li> |
125 |
</li> |
| 127 |
<li>Select "Memory Analysis"(see <a href="#Select_Memory_Analysis"> |
126 |
<li>Select "Memory Analysis"(see <a href="#Select_Memory_Analysis"> |
| 128 |
Figure</a>). |
127 |
Figure</a>). |
|
|
128 |
<br> |
| 129 |
<p><br><b><a name="Select_Memory_Analysis">Select Memory Analysis</a></b><br> |
| 130 |
<img src="../images/img_mem_prof.png" border="0"><br> |
| 131 |
<br> |
| 132 |
</p> |
| 133 |
</li> |
| 134 |
<li>Click on <b>Edit Options</b> to set any desired filter. |
| 129 |
</li> |
135 |
</li> |
| 130 |
<li>If you would like to track the source of your object allocation, |
136 |
<li>If you would like to track the source of your object allocation, |
| 131 |
click on Edit options and check the object allocation tracking check |
137 |
click on <b>Edit Options</b> and check the Track object allocation sites check |
| 132 |
box.<br> |
138 |
box.<br> |
|
|
139 |
</li> |
| 140 |
</ul> |
| 141 |
|
| 142 |
<h3>Thread Profile of an Eclipse Application</h3> |
| 143 |
<p>To perform a thread profile of your application, perform the following steps:</p> |
| 144 |
<ul> |
| 145 |
<li>Select "Profile" from the Profile drop down menu (see <a href="#Profile_Drop_Down_Menu_">Figure</a>). |
| 146 |
</li> |
| 147 |
<li>Select the "Monitor" tab from the profile launch configuration. |
| 148 |
</li> |
| 149 |
<li>Select "Thread Analysis" (see <a href="#Select_Thread_Analysis"> |
| 150 |
Figure</a>). |
| 151 |
<p><br><b><a name="Select_Thread_Analysis">Select Thread Analysis</a></b><br> |
| 152 |
<img src="../images/img_thrd_prof.png" border="0"><br> |
| 133 |
<br> |
153 |
<br> |
| 134 |
<img src="../images/img_mem_prof.png" border="0"><br> |
154 |
</p> |
| 135 |
</li> |
155 |
</li> |
| 136 |
</ul> |
156 |
</ul> |
| 137 |
<p><b> <a name="Select_Memory_Analysis">Select Memory |
157 |
<h3>Probe Insertion</h3> |
| 138 |
Analysis</a></b><br> |
158 |
<p>To perform analysis using probe insertion, perform the following steps:</p> |
| 139 |
</p> |
|
|
| 140 |
<h3>Thread Profile of an Eclipse Application</h3> |
| 141 |
<p>To perform a thread profile of your application, select "Profile" from |
| 142 |
the Profile drop down menu (see <a href="#Profile_Drop_Down_Menu_">Figure</a>). |
| 143 |
</p> |
| 144 |
<p>Perform the following steps: |
| 145 |
<ul> |
159 |
<ul> |
| 146 |
<li>Select the "Monitor" tab as shown in |
160 |
<li>Select "Profile" from the Profile drop down menu (see <a href="#Profile_Drop_Down_Menu_">Figure</a>). |
| 147 |
<a href="#Profile_Drop_Down_Menu_">Figure</a>. |
|
|
| 148 |
</li> |
161 |
</li> |
| 149 |
<li>Select "Thread Analysis" (see <a href="#Select_Thread_Analysis_"> |
162 |
<li>Select the "Monitor" tab from the profile launch configuration. |
| 150 |
Figure</a>).<br> |
163 |
</li> |
|
|
164 |
<li>Select "Probe Insertion" (see <a href="#Probe_Insertion"> |
| 165 |
Figure</a>). |
| 166 |
<p><br><b><a name="Probe_Insertion">Select Probe Insertion</a></b><br> |
| 167 |
<img src="../images/img_thrd_prof.png" border="0"><br> |
| 151 |
<br> |
168 |
<br> |
| 152 |
<img src="../images/img_thrd_prof.png" border="0"> </li> |
169 |
</p> |
|
|
170 |
</li> |
| 153 |
</ul> |
171 |
</ul> |
| 154 |
<p> </p> |
172 |
<p> </p> |
| 155 |
<p> </p> |
173 |
<p> </p> |
|
Lines 159-164
Link Here
|
| 159 |
<p>Java Profiler supports Java 1.4 and lower profiling. The profiler enables |
177 |
<p>Java Profiler supports Java 1.4 and lower profiling. The profiler enables |
| 160 |
profiling for determining performance bottlenecks and memory analysis of |
178 |
profiling for determining performance bottlenecks and memory analysis of |
| 161 |
your application.</p> |
179 |
your application.</p> |
|
|
180 |
<br> |
| 162 |
<p>The Java profiler enables support of multiple analysis types. Depending |
181 |
<p>The Java profiler enables support of multiple analysis types. Depending |
| 163 |
on the size of the application and the type of analysis required, limit the |
182 |
on the size of the application and the type of analysis required, limit the |
| 164 |
number of analysis types to be selected for your profiling session. Refer to |
183 |
number of analysis types to be selected for your profiling session. Refer to |
|
Lines 233-239
Link Here
|
| 233 |
<td headers="views_avail"><a href="texecstatvw.html">Execution |
252 |
<td headers="views_avail"><a href="texecstatvw.html">Execution |
| 234 |
Statistics (Package, Class, Method, Instance)</a>, |
253 |
Statistics (Package, Class, Method, Instance)</a>, |
| 235 |
<a href="../concepts/cecovsta.htm">Coverage Statistics</a>, |
254 |
<a href="../concepts/cecovsta.htm">Coverage Statistics</a>, |
| 236 |
<a href="../ref/reorpane.htm">Object References view*</a>, |
255 |
<a href="../ref/reorpane.htm">Object References view**</a>, |
| 237 |
<a href="../ref/reexflwvw.htm">Execution Flow view</a>, |
256 |
<a href="../ref/reexflwvw.htm">Execution Flow view</a>, |
| 238 |
<a href="../ref/resqdgvw.htm">UML2 Sequence diagrams views (object,class, |
257 |
<a href="../ref/resqdgvw.htm">UML2 Sequence diagrams views (object,class, |
| 239 |
thread)</a></td> |
258 |
thread)</a></td> |
|
Lines 250-287
Link Here
|
| 250 |
coverage</a></td> |
269 |
coverage</a></td> |
| 251 |
</tr> |
270 |
</tr> |
| 252 |
</table> |
271 |
</table> |
| 253 |
<p>* Note: For the Object References view, you will need to collect object |
272 |
<h4>Notes:</h4> |
|
|
273 |
<p>* For the Object References view, you will need to collect object |
| 254 |
references by invoking the action <b>Collect Object References</b> to view |
274 |
references by invoking the action <b>Collect Object References</b> to view |
| 255 |
the profiling data using the Object References view. You can invoke <b> |
275 |
the profiling data using the Object References view. You can invoke <b> |
| 256 |
Collect Object References</b> from the toolbar of the Profiling Monitor view |
276 |
Collect Object References</b> from the toolbar of the Profiling Monitor view |
| 257 |
or by right clicking on the agent in the Profiling Monitor view.</li> |
277 |
or by right clicking on the agent in the Profiling Monitor view.</p> |
| 258 |
</ol> |
278 |
<p>** For the Object References view, you will need to collect object |
|
|
279 |
references by invoking the action <b>Collect Object References</b> to view |
| 280 |
the profiling data using the Object References view. You can invoke <b> |
| 281 |
Collect Object References</b> from the toolbar.</p> |
| 282 |
|
| 283 |
|
| 259 |
<h2><a name="tefilter_limits">Setting profiling options</a></h2> |
284 |
<h2><a name="tefilter_limits">Setting profiling options</a></h2> |
| 260 |
<p>You can set profiling options for the <b>Java Profiling</b> data collector or |
285 |
<p>You can set profiling options for the <b>Java Profiling</b> data collector or |
| 261 |
the selected analysis types, by highlighting the entity and clicking <b>Edit |
286 |
the selected analysis types, by highlighting the entity and clicking <b>Edit |
| 262 |
Option</b>.</p> |
287 |
Options</b>.</p> |
| 263 |
<p>Follow the steps below to set profiling options on the <b>Java Profiling</b> |
288 |
<p>Follow the steps below to set profiling options on the <b>Java Profiling</b> |
| 264 |
data collector:</p> |
289 |
data collector:</p> |
| 265 |
<ol> |
290 |
<ol> |
| 266 |
<li>Highlight <b>Java Profiling</b> and click on <b>Edit Option</b> |
291 |
<li>Highlight <b>Java Profiling</b> and click on <b>Edit Options</b> |
| 267 |
</li> |
292 |
</li> |
| 268 |
<li>On the Filter Set page you can specify the filter set to be applied to |
293 |
<li>By default, all classes are profiled. You can change this on the Filter Set page by specifying |
| 269 |
your profiling session. By default <b>Automatically determine filtering |
294 |
the filter set to be applied to your profiling session. Under the <b>Select a filter set</b> list, click |
| 270 |
criteria</b> check box is selected and the scope of classes for which the |
295 |
<b>Add</b> to add the desired filter set. |
| 271 |
profiling data is collected is determined automatically by taking in account |
|
|
| 272 |
launch configuration type, your project and its' dependencies content and |
| 273 |
active working sets. |
| 274 |
</li> |
| 275 |
<li>You can specify the filtering criteria manually by unchecking the <b> |
| 276 |
Automatically determine filtering criteria</b> check box and selecting a |
| 277 |
filter set from the <b>Select a filter set</b> list. For example, you can |
| 278 |
use the <b>Default</b> set. |
| 279 |
</li> |
296 |
</li> |
| 280 |
<li>Under <b>Contents of selected filter set</b>, click <b>Add</b> to add |
297 |
<li>You can also specify the filtering criteria manually. Under <b>Contents of selected filter set</b>, |
| 281 |
packages that you want to collect data for. The Add Filter dialog opens. An |
298 |
click <b>Add</b> to add packages for which you want to collect data. The Add Filter dialog opens. An |
| 282 |
asterisk * can be used as a wildcard in a pattern when specifying package or |
299 |
asterisk * can be used as a wildcard in a pattern when specifying package or |
| 283 |
method names.<br> |
300 |
method names.<br> |
| 284 |
<b>Note 1.</b> When entering a pattern for the package or method name, the |
301 |
<b>Notes:</b> |
|
|
302 |
<ol> |
| 303 |
<li>When entering a pattern for the package or method name, the |
| 285 |
pattern must be specified in one of three ways: |
304 |
pattern must be specified in one of three ways: |
| 286 |
<ul> |
305 |
<ul> |
| 287 |
<li>A pattern with no wildcards, e.g. <tt>org.eclipse.tptp</tt>. |
306 |
<li>A pattern with no wildcards, e.g. <tt>org.eclipse.tptp</tt>. |
|
Lines 291-298
Link Here
|
| 291 |
<li>A pattern with a wildcard at the end, e.g. <tt>org.eclipse.*</tt>. |
310 |
<li>A pattern with a wildcard at the end, e.g. <tt>org.eclipse.*</tt>. |
| 292 |
</li> |
311 |
</li> |
| 293 |
</ul> |
312 |
</ul> |
| 294 |
<br> |
313 |
</li> |
| 295 |
<b>Note 2.</b> Certain classes will always be visible in the profiling views |
314 |
<li>Certain classes will always be visible in the profiling views |
| 296 |
regardless of the filter settings. The profiling agent will always collect |
315 |
regardless of the filter settings. The profiling agent will always collect |
| 297 |
data for objects or classes that are associated with the task being examined |
316 |
data for objects or classes that are associated with the task being examined |
| 298 |
while collecting data specific to the task. For example, you specify a |
317 |
while collecting data specific to the task. For example, you specify a |
|
Lines 306-324
Link Here
|
| 306 |
This behavior applies to threads as well. The <tt>java.lang.Thread</tt> |
325 |
This behavior applies to threads as well. The <tt>java.lang.Thread</tt> |
| 307 |
class will always show up in the Profiling views because the profiling agent |
326 |
class will always show up in the Profiling views because the profiling agent |
| 308 |
tracks all running threads, and therefore, collects data for objects or |
327 |
tracks all running threads, and therefore, collects data for objects or |
| 309 |
classes associated with those threads. <br> |
328 |
classes associated with those threads.</li> |
| 310 |
<br> |
329 |
</ol> |
| 311 |
</li> |
330 |
<li>Specify the <b>Package or Class</b>, <b>Method Name</b> that you wish to filter. If you want see the |
| 312 |
<li>Specify the <b>Package or Class</b>, <b>Method Name</b> and select |
331 |
profiling data for these packages, classes, methods, select Include from the <b>Rule</b> drop-down list. If |
| 313 |
Include from the <b>Rule</b> drop-down list. <br> |
332 |
you want to exclude these packages, classes, methods, from the profiling data click |
| 314 |
</li> |
|
|
| 315 |
<li>Click <b>OK</b>. The filter criterion is added to the contents list. |
| 316 |
</li> |
| 317 |
<li>To exclude other existing packages from the filter contents list, click |
| 318 |
on <b>Include</b> under the Rule column for the package, and change it to <b> |
333 |
on <b>Include</b> under the Rule column for the package, and change it to <b> |
| 319 |
Exclude</b>. |
334 |
Exclude</b>.</li> |
|
|
335 |
<li>Click <b>OK</b>. The filter criterion is added to the contents list. |
| 320 |
</li> |
336 |
</li> |
| 321 |
<li>Click <b>Next</b> |
337 |
<li>On Java 1.5 and higher, click <b>Finish</b> and proceed to step 11 below. On Java 1.4 and lower, click |
|
|
338 |
<b>Next</b> and proceed to the next step. |
| 322 |
</li> |
339 |
</li> |
| 323 |
<li>To limit the data collected by method invocations select the <b>Stop |
340 |
<li>To limit the data collected by method invocations select the <b>Stop |
| 324 |
profiling after specified number of method invocations</b> check box. |
341 |
profiling after specified number of method invocations</b> check box. |
|
Lines 328-346
Link Here
|
| 328 |
specified amount of time</b> check box. Specify the amount of time in |
345 |
specified amount of time</b> check box. Specify the amount of time in |
| 329 |
seconds in the input box provided. |
346 |
seconds in the input box provided. |
| 330 |
</li> |
347 |
</li> |
| 331 |
<li>To start the profiling agent in pause mode so that data is not collected |
348 |
<li>To start the profiling agent automatically when the application is launched, check the <b> |
| 332 |
during the initialization stage of the application, clear the <b> |
349 |
Automatically start monitoring when application is launched</b> check box. <b>Note:</b> It is |
| 333 |
Automatically start monitoring when application is launched</b> check box. |
350 |
strongly recommended for large applications that are not |
| 334 |
This option is strongly recommended for large applications that are not |
|
|
| 335 |
required to be monitored during the initialization phase (for example |
351 |
required to be monitored during the initialization phase (for example |
| 336 |
launching an instance of the workbench). |
352 |
launching an instance of the workbench), that you accept the deafult and leave the deselection of the <b> |
|
|
353 |
Automatically start monitoring when application is launched</b> check box. This will result in the |
| 354 |
profiling agent being started in pause mode so that data is not collected |
| 355 |
during the initialization stage of the application. |
| 337 |
</li> |
356 |
</li> |
| 338 |
<li>Click <b>Finish</b> |
357 |
<li>Click <b>Finish</b> |
| 339 |
</li> |
358 |
</li> |
| 340 |
<li>Click <b>Apply</b> to save the changes. </li> |
359 |
<li>Click <b>Apply</b> to save the changes. </li> |
| 341 |
</ol> |
360 |
</ol> |
| 342 |
<p>Similarly, you can set the options of an analysis type by highlighting it and |
361 |
<p>Similarly, you can set the options of an analysis type by highlighting it and |
| 343 |
selecting <b>Edit Option</b>. </p> |
362 |
selecting <b>Edit Options</b>. </p> |
| 344 |
<h2><a name="tefilter_dest">Configuring the profiling data destination</a></h2> |
363 |
<h2><a name="tefilter_dest">Configuring the profiling data destination</a></h2> |
| 345 |
<p>You can specify the project, and the monitor to use for your profiling |
364 |
<p>You can specify the project, and the monitor to use for your profiling |
| 346 |
session. You can also write the profiling data to a file.</p> |
365 |
session. You can also write the profiling data to a file.</p> |
|
Lines 371-377
Link Here
|
| 371 |
<a href="tecretrc.htm">Profiling an application</a><br> |
390 |
<a href="tecretrc.htm">Profiling an application</a><br> |
| 372 |
<a href="testpref.htm">Setting profiling preferences</a></p> |
391 |
<a href="testpref.htm">Setting profiling preferences</a></p> |
| 373 |
<br> |
392 |
<br> |
| 374 |
<p class="copyright">(C) Copyright IBM Corporation 2000, 2006. All Rights |
393 |
<p class="copyright">(C) Copyright IBM Corporation 2000, 2007. All Rights |
| 375 |
Reserved.</p> |
394 |
Reserved.</p> |
| 376 |
<br> |
395 |
<br> |
| 377 |
|
396 |
|