|Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications|
by J. Seward, N. Nethercote, J. Weidendorfer and the Valgrind Development Team
Paperback (6"x9"), 164 pages
RRP £12.95 ($19.95)
9.6 Helgrind Options
The following end-user options are available:
--happens-before=none|threads|all [default: all]Helgrind always regards locks as the basis for inter-thread synchronisation. However, by default, before reporting a race error, Helgrind will also check whether certain other kinds of inter-thread synchronisation events happened. It may be that if such events took place, then no race really occurred, and so no error needs to be reported. See 9.4.3 for a discussion of transfers of exclusive ownership states between threads. With
--happens-before=all, the following events are regarded as sources of synchronisation: thread creation/joinage, condition variable signal/broadcast/waits, and semaphore posts/waits. With
--happens-before=threads, only thread creation/joinage events are regarded as sources of synchronisation. With
--happens-before=none, no events (apart, of course, from locking) are regarded as sources of synchronisation. Changing this setting from the default will increase your false-error rate but give little or no gain. The only advantage is that
--happens-before=noneshould make Helgrind less and less sensitive to the scheduling of threads, and hence the output more and more repeatable across runs.
--trace-level=0|1|2 [default: 1]Requests that Helgrind produces a log of all state changes to location 0xXXYYZZ. This can be helpful in tracking down tricky races.
--trace-levelcontrols the verbosity of the log. At the default setting (1), a one-line summary of is printed for each state change. At level 2 a complete stack trace is printed for each state change.
In addition, the following debugging options are available for Helgrind:
--trace-malloc=no|yes [no]Show all client malloc (etc) and free (etc) requests.
--gen-vcg=no|yes|yes-w-vts [no]At exit, write to stderr a dump of the happens-before graph computed by Helgrind, in a format suitable for the VCG graph visualisation tool. A suitable command line is:
valgrind --tool=helgrind --gen-vcg=yes my_app 2>&1 | grep xxxxxx | sed ``s/xxxxxx//g'' | xvcg -With
--gen-vcg=yes, the basic happens-before graph is shown. With
--gen-vcg=yes-w-vts, the vector timestamp for each node is also shown.
--cmp-race-err-addrs=no|yes [no]Controls whether or not race (data) addresses should be taken into account when removing duplicates of race errors. With
--cmp-race-err-addrs=no, two otherwise identical race errors will be considered to be the same if their race addresses differ. With With
--cmp-race-err-addrs=yesthey will be considered different. This is provided to help make certain regression tests work reliably.
--hg-sanity-flags=<XXXXXX> (X = 0|1) Run extensive sanity checks on Helgrind's internal data structures at events defined by the bitstring, as follows: ‘100000 ’at every query to the happens-before graph ‘010000 ’after changes to the lock order acquisition graph ‘001000 ’after every client memory access (NB: not currently used) ‘000100 ’after every client memory range permission setting of 256 bytes or greater ‘000010 ’after every client lock or unlock event ‘000001 ’after every client thread creation or joinage event Note these will make Helgrind run very slowly, often to the point of being completely unusable.
|ISBN 0954612051||Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications||See the print edition|