Debian Codegraph @

docs/html/lk-manual.html

raw
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>11. Lackey: an example tool</title>
5 <link rel="stylesheet" type="text/css" href="vg_basic.css">
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="Valgrind Documentation">
8 <link rel="up" href="manual.html" title="Valgrind User Manual">
9 <link rel="prev" href="dh-manual.html" title="10. DHAT: a dynamic heap analysis tool">
10 <link rel="next" href="nl-manual.html" title="12. Nulgrind: the minimal Valgrind tool">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <div><table class="nav" width="100%" cellspacing="3" cellpadding="3" border="0" summary="Navigation header"><tr>
14 <td width="22px" align="center" valign="middle"><a accesskey="p" href="dh-manual.html"><img src="images/prev.png" width="18" height="21" border="0" alt="Prev"></a></td>
15 <td width="25px" align="center" valign="middle"><a accesskey="u" href="manual.html"><img src="images/up.png" width="21" height="18" border="0" alt="Up"></a></td>
16 <td width="31px" align="center" valign="middle"><a accesskey="h" href="index.html"><img src="images/home.png" width="27" height="20" border="0" alt="Up"></a></td>
17 <th align="center" valign="middle">Valgrind User Manual</th>
18 <td width="22px" align="center" valign="middle"><a accesskey="n" href="nl-manual.html"><img src="images/next.png" width="18" height="21" border="0" alt="Next"></a></td>
19 </tr></table></div>
20 <div class="chapter">
21 <div class="titlepage"><div><div><h1 class="title">
22 <a name="lk-manual"></a>11. Lackey: an example tool</h1></div></div></div>
23 <div class="toc">
24 <p><b>Table of Contents</b></p>
25 <dl class="toc">
26 <dt><span class="sect1"><a href="lk-manual.html#lk-manual.overview">11.1. Overview</a></span></dt>
27 <dt><span class="sect1"><a href="lk-manual.html#lk-manual.options">11.2. Lackey Command-line Options</a></span></dt>
28 </dl>
29 </div>
30 <p>To use this tool, you must specify
31 <code class="option">--tool=lackey</code> on the Valgrind
32 command line.</p>
33 <div class="sect1">
34 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
35 <a name="lk-manual.overview"></a>11.1. Overview</h2></div></div></div>
36 <p>Lackey is a simple Valgrind tool that does various kinds of basic
37 program measurement. It adds quite a lot of simple instrumentation to the
38 program's code. It is primarily intended to be of use as an example tool,
39 and consequently emphasises clarity of implementation over
40 performance.</p>
41 </div>
42 <div class="sect1">
43 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
44 <a name="lk-manual.options"></a>11.2. Lackey Command-line Options</h2></div></div></div>
45 <p>Lackey-specific command-line options are:</p>
46 <div class="variablelist">
47 <a name="lk.opts.list"></a><dl class="variablelist">
48 <dt>
49 <a name="opt.basic-counts"></a><span class="term">
50 <code class="option">--basic-counts=&lt;no|yes&gt; [default: yes] </code>
51 </span>
52 </dt>
53 <dd>
54 <p>When enabled, Lackey prints the following statistics and
55 information about the execution of the client program:</p>
56 <div class="orderedlist"><ol class="orderedlist" type="1">
57 <li class="listitem"><p>The number of calls to the function specified by the
58 <code class="option">--fnname</code> option (the default is
59 <code class="computeroutput">main</code>).
60 If the program has had its symbols stripped, the count will always
61 be zero.</p></li>
62 <li class="listitem"><p>The number of conditional branches encountered and the
63 number and proportion of those taken.</p></li>
64 <li class="listitem"><p>The number of superblocks entered and completed by the
65 program. Note that due to optimisations done by the JIT, this
66 is not at all an accurate value.</p></li>
67 <li class="listitem"><p>The number of guest (x86, amd64, ppc, etc.) instructions and IR
68 statements executed. IR is Valgrind's RISC-like intermediate
69 representation via which all instrumentation is done.
70 </p></li>
71 <li class="listitem"><p>Ratios between some of these counts.</p></li>
72 <li class="listitem"><p>The exit code of the client program.</p></li>
73 </ol></div>
74 </dd>
75 <dt>
76 <a name="opt.detailed-counts"></a><span class="term">
77 <code class="option">--detailed-counts=&lt;no|yes&gt; [default: no] </code>
78 </span>
79 </dt>
80 <dd><p>When enabled, Lackey prints a table containing counts of loads,
81 stores and ALU operations, differentiated by their IR types.
82 The IR types are identified by their IR name ("I1", "I8", ... "I128",
83 "F32", "F64", and "V128").</p></dd>
84 <dt>
85 <a name="opt.trace-mem"></a><span class="term">
86 <code class="option">--trace-mem=&lt;no|yes&gt; [default: no] </code>
87 </span>
88 </dt>
89 <dd><p>When enabled, Lackey prints the size and address of almost every
90 memory access made by the program. See the comments at the top of
91 the file <code class="computeroutput">lackey/lk_main.c</code> for details
92 about the output format, how it works, and inaccuracies in the address
93 trace. Note that this option produces immense amounts of output.</p></dd>
94 <dt>
95 <a name="opt.trace-superblocks"></a><span class="term">
96 <code class="option">--trace-superblocks=&lt;no|yes&gt; [default: no] </code>
97 </span>
98 </dt>
99 <dd><p>When enabled,
100 Lackey prints out the address of every superblock
101 (a single entry, multiple exit, linear chunk of code) executed by the
102 program. This is primarily of interest to Valgrind developers. See
103 the comments at the top of the file
104 <code class="computeroutput">lackey/lk_main.c</code> for details about
105 the output format. Note that this option produces large amounts of
106 output.</p></dd>
107 <dt>
108 <a name="opt.fnname"></a><span class="term">
109 <code class="option">--fnname=&lt;name&gt; [default: main] </code>
110 </span>
111 </dt>
112 <dd><p>Changes the function for which calls are counted when
113 <code class="option">--basic-counts=yes</code> is specified.</p></dd>
114 </dl>
115 </div>
116 </div>
117 </div>
118 <div>
119 <br><table class="nav" width="100%" cellspacing="3" cellpadding="2" border="0" summary="Navigation footer">
120 <tr>
121 <td rowspan="2" width="40%" align="left">
122 <a accesskey="p" href="dh-manual.html">&lt;&lt; 10. DHAT: a dynamic heap analysis tool</a> </td>
123 <td width="20%" align="center"><a accesskey="u" href="manual.html">Up</a></td>
124 <td rowspan="2" width="40%" align="right"> <a accesskey="n" href="nl-manual.html">12. Nulgrind: the minimal Valgrind tool &gt;&gt;</a>
125 </td>
126 </tr>
127 <tr><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td></tr>
128 </table>
129 </div>
130 </body>
131 </html>