97 lines
5.7 KiB
HTML
97 lines
5.7 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="reference" />
|
||
|
<meta name="DC.Title" content="Flight recorders" />
|
||
|
<meta name="abstract" content="A useful way to debug multithreaded applications is to write data to a flight recorder. A flight recorder is a file, output buffer, or some other object where trace information is written so that problems in the application can be tracked." />
|
||
|
<meta name="description" content="A useful way to debug multithreaded applications is to write data to a flight recorder. A flight recorder is a file, output buffer, or some other object where trace information is written so that problems in the application can be tracked." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzahwbugco.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzahwe20rx.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzahwfly-flyco" />
|
||
|
<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>Flight recorders</title>
|
||
|
</head>
|
||
|
<body id="rzahwfly-flyco"><a name="rzahwfly-flyco"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Flight recorders</h1>
|
||
|
<div><p>A useful way to debug multithreaded applications is to write data
|
||
|
to a flight recorder. A flight recorder is a file, output buffer, or some
|
||
|
other object where trace information is written so that problems in the application
|
||
|
can be tracked.</p>
|
||
|
<div class="section"><p>Entries to and exits from a function are typical information that
|
||
|
is traced in a flight recorder. Parameters that are passed to functions, major
|
||
|
changes in control flow, and error conditions are often tracked as well.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>The Pthread library provides a way for your application to trace
|
||
|
problems. Tracing allows you to cut optional trace points, turn the recorder
|
||
|
on or off, and recompile your application so that all of the tracing code
|
||
|
is removed.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>You can use different levels of tracing. If your application wants
|
||
|
to honor the trace levels, it is the application's responsibility to cue trace
|
||
|
points at the appropriate trace levels, or manage the trace level. The Pthread
|
||
|
library provides APIs, macros, and trace level variables to assist you.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>For Pthread tracing, an error-level tracing displays only those
|
||
|
trace points that have error-level severity. An informational-level tracing
|
||
|
traces all error-level trace points in addition to the informational trace
|
||
|
points. A verbose-level trace point traces all levels. Each trace point automatically
|
||
|
includes the thread ID, a timestamp of millisecond granularity, and the trace
|
||
|
data.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>The CL commands that enable, display, and work with the tracing
|
||
|
are part of <span class="keyword">i5/OS™</span>. </p>
|
||
|
</div>
|
||
|
<div class="section"><p>The tracing buffers for your tracepoints are created as user space
|
||
|
objects in the QUSRSYS library. The trace buffers are named QP0Zxxxxxx, in
|
||
|
which xxxxxx is the six-digit job number of the job that performed the tracing. </p>
|
||
|
</div>
|
||
|
<div class="section"><p>The following APIs relate to tracing and are detailed in the
|
||
|
UNIX-Type APIs guide:</p>
|
||
|
<ul><li><span class="apiname">Qp0zUprintf</span> - print formatted trace data </li>
|
||
|
<li><span class="apiname">Qp0zDump</span> - dump formatted hexadecimal
|
||
|
data </li>
|
||
|
<li><span class="apiname">Qp0zDumpStack</span> - dump the call stack of the calling
|
||
|
thread</li>
|
||
|
<li><span class="apiname">Qp0zDumpTargetStack</span> - dump the call stack of the target
|
||
|
thread</li>
|
||
|
<li><span class="apiname">Qp0zLprintf</span> - print formatted job log message </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><p>The following CL commands that allow you to manipulate tracing:</p>
|
||
|
<ul><li><span class="cmdname">DMPUSRTRC</span> - dump the contents of a specified job's
|
||
|
trace </li>
|
||
|
<li><span class="cmdname">CHGUSRTRC</span> - change attributes (size, wrapping, clear)
|
||
|
of a specified job's trace</li>
|
||
|
<li><span class="cmdname">DLTUSRTRC</span> - delete the persistent trace object that
|
||
|
is associated with a job's trace </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rzahwe20rx.htm">Example: Sample flight recorder output from a Pthread program</a></strong><br />
|
||
|
This example shows a Pthread program that is using the flight recorder or tracing interfaces that are provided by the system.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahwbugco.htm" title="Use the concepts and techniques that are described here to learn about debugging and servicing multithreaded jobs:">Debugging and servicing of multithreaded jobs</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|