To use this tool, you must specify
--tool=lackey on the Valgrind
Lackey is a simple Valgrind tool that does various kinds of basic program measurement. It adds quite a lot of simple instrumentation to the program's code. It is primarily intended to be of use as an example tool, and consequently emphasises clarity of implementation over performance.
Lackey-specific command-line options are:
--basic-counts=<no|yes> [default: yes]
When enabled, Lackey prints the following statistics and information about the execution of the client program:
The number of calls to the function specified by the
--fnname option (the default is
If the program has had its symbols stripped, the count will always
The number of conditional branches encountered and the number and proportion of those taken.
The number of superblocks entered and completed by the program. Note that due to optimisations done by the JIT, this is not at all an accurate value.
The number of guest (x86, amd64, ppc, etc.) instructions and IR statements executed. IR is Valgrind's RISC-like intermediate representation via which all instrumentation is done.
Ratios between some of these counts.
The exit code of the client program.
--detailed-counts=<no|yes> [default: no]
When enabled, Lackey prints a table containing counts of loads, stores and ALU operations, differentiated by their IR types. The IR types are identified by their IR name ("I1", "I8", ... "I128", "F32", "F64", and "V128").
--trace-mem=<no|yes> [default: no]
When enabled, Lackey prints the size and address of almost every
memory access made by the program. See the comments at the top of
lackey/lk_main.c for details
about the output format, how it works, and inaccuracies in the address
trace. Note that this option produces immense amounts of output.
--trace-superblocks=<no|yes> [default: no]
Lackey prints out the address of every superblock
(a single entry, multiple exit, linear chunk of code) executed by the
program. This is primarily of interest to Valgrind developers. See
the comments at the top of the file
lackey/lk_main.c for details about
the output format. Note that this option produces large amounts of
--fnname=<name> [default: main]
Changes the function for which calls are counted when
--basic-counts=yes is specified.