1 <?xml version="1.0"?> <!-- -*- sgml -*- -->
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5 <chapter id="lk-manual" xreflabel="Lackey">
7 <title>Lackey: an example tool</title>
9 <para>To use this tool, you must specify
10 <option>--tool=lackey</option> on the Valgrind
14 <sect1 id="lk-manual.overview" xreflabel="Overview">
15 <title>Overview</title>
17 <para>Lackey is a simple Valgrind tool that does various kinds of basic
18 program measurement. It adds quite a lot of simple instrumentation to the
19 program's code. It is primarily intended to be of use as an example tool,
20 and consequently emphasises clarity of implementation over
26 <sect1 id="lk-manual.options" xreflabel="Lackey Command-line Options">
27 <title>Lackey Command-line Options</title>
29 <para>Lackey-specific command-line options are:</para>
31 <!-- start of xi:include in the manpage -->
32 <variablelist id="lk.opts.list">
34 <varlistentry id="opt.basic-counts" xreflabel="--basic-counts">
36 <option><![CDATA[--basic-counts=<no|yes> [default: yes] ]]></option>
39 <para>When enabled, Lackey prints the following statistics and
40 information about the execution of the client program:</para>
45 <para>The number of calls to the function specified by the
46 <option>--fnname</option> option (the default is
47 <computeroutput>main</computeroutput>).
48 If the program has had its symbols stripped, the count will always
53 <para>The number of conditional branches encountered and the
54 number and proportion of those taken.</para>
58 <para>The number of superblocks entered and completed by the
59 program. Note that due to optimisations done by the JIT, this
60 is not at all an accurate value.</para>
64 <para>The number of guest (x86, amd64, ppc, etc.) instructions and IR
65 statements executed. IR is Valgrind's RISC-like intermediate
66 representation via which all instrumentation is done.
71 <para>Ratios between some of these counts.</para>
75 <para>The exit code of the client program.</para>
83 <varlistentry id="opt.detailed-counts" xreflabel="--detailed-counts">
85 <option><![CDATA[--detailed-counts=<no|yes> [default: no] ]]></option>
88 <para>When enabled, Lackey prints a table containing counts of loads,
89 stores and ALU operations, differentiated by their IR types.
90 The IR types are identified by their IR name ("I1", "I8", ... "I128",
91 "F32", "F64", and "V128").</para>
95 <varlistentry id="opt.trace-mem" xreflabel="--trace-mem">
97 <option><![CDATA[--trace-mem=<no|yes> [default: no] ]]></option>
100 <para>When enabled, Lackey prints the size and address of almost every
101 memory access made by the program. See the comments at the top of
102 the file <computeroutput>lackey/lk_main.c</computeroutput> for details
103 about the output format, how it works, and inaccuracies in the address
104 trace. Note that this option produces immense amounts of output.</para>
108 <varlistentry id="opt.trace-superblocks" xreflabel="--trace-superblocks">
110 <option><![CDATA[--trace-superblocks=<no|yes> [default: no] ]]></option>
114 Lackey prints out the address of every superblock
115 (a single entry, multiple exit, linear chunk of code) executed by the
116 program. This is primarily of interest to Valgrind developers. See
117 the comments at the top of the file
118 <computeroutput>lackey/lk_main.c</computeroutput> for details about
119 the output format. Note that this option produces large amounts of
124 <varlistentry id="opt.fnname" xreflabel="--fnname">
126 <option><![CDATA[--fnname=<name> [default: main] ]]></option>
129 <para>Changes the function for which calls are counted when
130 <option>--basic-counts=yes</option> is specified.</para>
135 <!-- end of xi:include in the manpage -->