From: "Richard W.M. Jones"<rjones redhat com>
This commit allows you to run the daemon under valgrind. You have to
enable it at configure time:
./configure --enable-valgrind-daemon
This should *not* be done for production builds.
When this feature is enabled, valgrind is added to the appliance and
the daemon is run under valgrind. Log messages from valgrind are
passed back over a virtio-serial channel into a file called
'valgrind.log.$PID' in the top build directory.
Running 'make check', 'make extra-tests' etc causes many
valgrind.log.* files to be created which must be examined by hand.
---
.gitignore | 1 +
appliance/Makefile.am | 9 +++++++--
appliance/init | 10 +++++++++-
appliance/packagelist.in | 4 ++++
configure.ac | 15 +++++++++++++++
src/guestfs.c | 2 ++
src/launch.c | 10 ++++++++++
7 files changed, 48 insertions(+), 3 deletions(-)

Could you stick a comment here explaining what this #ifdef is for? It's
not obvious enough from the code.