144 lines
10 KiB
HTML
144 lines
10 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="task" />
|
||
|
<meta name="DC.Title" content="Collect Java performance data" />
|
||
|
<meta name="abstract" content="To collect Java performance data on an iSeries server, follow these steps." />
|
||
|
<meta name="description" content="To collect Java performance data on an iSeries server, follow these steps." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="tuning.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="evenperf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="runtperf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="gc.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="jnmiperf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="jmiperf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="excperf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="callperf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="profperf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="pdc.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="jpdc.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="runjpdc.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="colpdc" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Collect Java performance data</title>
|
||
|
</head>
|
||
|
<body id="colpdc"><a name="colpdc"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Collect Java performance data</h1>
|
||
|
<div><p>To collect Java™ performance data on an iSeries™ server,
|
||
|
follow these steps.</p>
|
||
|
<ol><li class="stepexpand"><span>Create a Performance Explorer (PEX) definition that specifies:
|
||
|
</span> <ul><li>A user-defined name</li>
|
||
|
<li>Type of data collection</li>
|
||
|
<li>Job name</li>
|
||
|
<li>Series of system events that you would like to collect system information
|
||
|
about</li>
|
||
|
</ul>
|
||
|
<div class="note"><span class="notetitle">Note:</span> A PEX definition of *STATS is preferable to a *TRACE definition
|
||
|
if the output that you want is the <samp class="codeph">java_g -prof</samp> type, and
|
||
|
you know the specific job name of the Java program. </div>
|
||
|
<p>Here is an example
|
||
|
of a *STATS definition:</p>
|
||
|
<pre> ADDPEXDFN DFN(YOURDFN) JOB(*ALL/YOURID/QJVACMDSRV) DTAORG(*HIER)
|
||
|
TEXT('your stats definition')</pre>
|
||
|
This *STATS definition does
|
||
|
not get all Java events running. Only the Java events
|
||
|
that are in your own Java session are profiled. This mode of
|
||
|
operation may increase the time that it takes to run the Java program.
|
||
|
<p>Here is an example of a *TRACE definition:</p>
|
||
|
<pre> ADDPEXDFN DFN(YOURDFN) TYPE(*TRACE) JOB(*ALL) TRCTYPE(*SLTEVT)
|
||
|
SLTEVT(*YES) PGMEVT(*JVAENTRY *JVAEXIT)</pre>
|
||
|
<p>This *TRACE definition
|
||
|
collects any Java entry event and exit event from any Java program
|
||
|
in the system that you create with ENBPFRCOL(*ENTRYEXIT). This causes the
|
||
|
analysis of this type of collection to be slower than a *STATS trace, depending
|
||
|
on how many Java program events you have and the duration of the
|
||
|
PEX data collection.</p>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>Enable the *JVAENTRY and *JVAEXIT, under the program events category
|
||
|
on the PEX definition, so that PEX recognizes the Java entry and exits.</span> <div class="note"><span class="notetitle">Note:</span> If
|
||
|
you are running the Java code using the Just-in-time (JIT) compiler,
|
||
|
you do not enable entry and exit as you would if you were using the CRTJVAPGM
|
||
|
command for direct processing. Instead, JIT generates code with entry and
|
||
|
exit hooks when you use the os400.enbprfcol <a href="sysprop.htm">system
|
||
|
property</a>.</div>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>Prepare the Java program to report program events to
|
||
|
the iSeries Performance
|
||
|
Data Collector.</span> <p>You can do this by using the <a href="../cl/crtjvapgm.htm" target="_blank">Create Java Program (CRTJVAPGM)</a> command
|
||
|
on any Java program that you want to report performance data
|
||
|
on. You must create the Java program by using the ENBPFRCOL(*ENTRYEXIT)
|
||
|
parameter.</p>
|
||
|
<div class="note"><span class="notetitle">Note:</span> You must repeat this step for every Java program
|
||
|
that you want to collect performance data on. If you do not perform this step,
|
||
|
no performance data is collected by the PEX and no output is produced by running
|
||
|
the <a href="jpdc.htm">Java Performance Data Converter (JPDC) tool</a>.</div>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>Start the PEX data collection by using the Start Performance Explorer
|
||
|
(STRPEX) command.</span></li>
|
||
|
<li class="stepexpand"><span>Run the program that you would like to analyze.</span> <p>This
|
||
|
program should not be in a production environment. It generates a large amount
|
||
|
of data in a small amount of time. You should limit the collection time to
|
||
|
five minutes. A Java program that runs for this amount of time generates
|
||
|
a lot of PEX system data. If too much data is collected, an unreasonable amount
|
||
|
of time is required to process it.</p>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>End the PEX data collection by using the End Performance Explorer
|
||
|
(ENDPEX) command.</span> <div class="note"><span class="notetitle">Note:</span> If this is not the first time that you
|
||
|
have ended PEX data collection, you must specify a replace file of *YES or
|
||
|
it does not save your data.</div>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>Run the JPDC tool.</span></li>
|
||
|
<li class="stepexpand"><span>Connect the integrated file system directory to the system with
|
||
|
the viewer of your choice: java_g -prof viewer or Jinsight viewer.</span> <p>You
|
||
|
can copy this file from you iSeries server and use it as input to any suitable
|
||
|
profiling tool.</p>
|
||
|
</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="pdc.htm">Performance Data Collector tool</a></strong><br />
|
||
|
The Performance Data Collector (PDC) tool provides profile information
|
||
|
about the programs that run on the iSeries server.</li>
|
||
|
<li class="ulchildlink"><strong><a href="jpdc.htm">Java Performance Data Converter tool</a></strong><br />
|
||
|
The Java Performance Data Converter (JDPC) tool provides
|
||
|
a way for you to create Java performance data about the Java programs
|
||
|
that are running on your iSeries server. This performance data is compatible
|
||
|
with the performance data output of Sun Microsystems, Inc.'s Java virtual
|
||
|
machine <samp class="codeph">java_g -prof</samp> option and IBM<sup>®</sup> Jinsight output.</li>
|
||
|
<li class="ulchildlink"><strong><a href="runjpdc.htm">Run the Java Performance Data Converter</a></strong><br />
|
||
|
To run the Java Performance Data Converter (JPDC) for
|
||
|
performance data collection, follow these steps.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="tuning.htm" title="You should take several aspects of Java application performance into consideration when building a Java application for your iSeries server.">Tune Java program performance with IBM Developer Kit for Java</a></div>
|
||
|
</div>
|
||
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
||
|
<div><a href="evenperf.htm" title="The iSeries Java virtual machine enables the trace of certain Java events.">Java event trace performance tools</a></div>
|
||
|
<div><a href="runtperf.htm" title="Understanding the following considerations can help you improve the performance of your Java applications.">Java performance considerations</a></div>
|
||
|
<div><a href="gc.htm" title="Garbage collection is the process of freeing storage that is used by objects that are no longer referred to by a program. With garbage collection, programmers no longer have to write error prone code to explicitly "free" or "delete" their objects. This code frequently results in "memory leak" program errors. The garbage collector automatically detects an object or group of objects that the user program can no longer reach. It does this because there are no references to that object in any program structure. Once the object has been collected, you can allocate the space for other uses.">Java garbage collection</a></div>
|
||
|
<div><a href="jnmiperf.htm" title="Native method invocation on an iSeries server may not perform as well as native method invocation on other platforms.">Java Native Method Invocation performance considerations</a></div>
|
||
|
<div><a href="jmiperf.htm" title="Method inlining can significantly improve method call performance. Any method that is final is a potential candidate for inlining.">Java method inlining performance considerations</a></div>
|
||
|
<div><a href="excperf.htm" title="The iSeries exception architecture allows versatile interrupt and retry capabilities. It also allows mixed language interaction. Throwing Java exceptions on an iSeries server may be more expensive than on other platforms. This should not affect overall application performance unless Java exceptions are routinely used in the normal application path.">Java exception performance considerations</a></div>
|
||
|
<div><a href="callperf.htm" title="Java method call traces provide significant performance information about the time that is spent in each Java method.">Java call trace performance tools</a></div>
|
||
|
<div><a href="profperf.htm" title="System wide central processing unit (CPU) profiling calculates the relative amount of CPU time that is spent in each Java method and all system functions in use by your Java program.">Java profiling performance tools</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|