Using and understanding the Valgrind core
--sim-hints=hint1,hint2,...
Pass miscellaneous hints to Valgrind which slightly modify the simulated behaviour in nonstandard or dangerous ways,
possibly to help the simulation of strange features. By default no hints are enabled. Use with caution! Currently
known hints are:
•
lax-ioctls:
Be very lax about ioctl handling; the only assumption is that the size is correct. Doesn’t require
the full buffer to be initialized when writing. Without this, using some device drivers with a large number of strange
ioctl commands becomes very tiresome.
•
enable-outer:
Enable some special magic needed when the program being run is itself Valgrind.
•
no-inner-prefix:
Disable printing a prefix
>
in front of each stdout or stderr output line in an inner
Valgrind being run by an outer Valgrind. This is useful when running Valgrind regression tests in an outer/inner
setup. Note that the prefix
>
will always be printed in front of the inner debug logging lines.
•
fuse-compatible:
Enable special handling for certain system calls that may block in a FUSE file-system.
This may be necessary when running Valgrind on a multi-threaded program that uses one thread to manage a FUSE
file-system and another thread to access that file-system.
--fair-sched=<no|yes|try>
[default:
no]
The
--fair-sched
option controls the locking mechanism used by Valgrind to serialise thread execution.
The
locking mechanism controls the way the threads are scheduled, and different settings give different trade-offs between
fairness and performance.
For more details about the Valgrind thread serialisation scheme and its impact on
performance and thread scheduling, see
Scheduling and Multi-Thread Performance
.
• The value
--fair-sched=yes
activates a fair scheduler.
In short, if multiple threads are ready to run, the
threads will be scheduled in a round robin fashion.
This mechanism is not available on all platforms or Linux
versions. If not available, using
--fair-sched=yes
will cause Valgrind to terminate with an error.
You may find this setting improves overall responsiveness if you are running an interactive multithreaded program,
for example a web browser, on Valgrind.
• The value
--fair-sched=try
activates fair scheduling if available on the platform.
Otherwise, it will
automatically fall back to
--fair-sched=no
.
• The value
--fair-sched=no
activates a scheduler which does not guarantee fairness between threads ready to
run, but which in general gives the highest performance.
--kernel-variant=variant1,variant2,...
Handle system calls and ioctls arising from minor variants of the default kernel for this platform. This is useful for
running on hacked kernels or with kernel modules which support nonstandard ioctls, for example. Use with caution.
If you don’t understand what this option does then you almost certainly don’t need it. Currently known variants are:
•
bproc:
Support the
sys_broc
system call on x86. This is for running on BProc, which is a minor variant of
standard Linux which is sometimes used for building clusters.
--show-emwarns=<yes|no> [default:
no]
When enabled, Valgrind will emit warnings about its CPU emulation in certain cases.
These are usually not
interesting.
19