набор инструментов для отладки и профилирования программ (a suite of tools for debugging and profiling programs)
DRD OPTIONS
--check-stack-var=<yes|no> [default: no]
Controls whether DRD detects data races on stack variables.
Verifying stack variables is disabled by default because most
programs do not share stack variables over threads.
--exclusive-threshold=<n> [default: off]
Print an error message if any mutex or writer lock has been
held longer than the time specified in milliseconds. This
option enables the detection of lock contention.
--join-list-vol=<n> [default: 10]
Data races that occur between a statement at the end of one
thread and another thread can be missed if memory access
information is discarded immediately after a thread has been
joined. This option allows one to specify for how many joined
threads memory access information should be retained.
--first-race-only=<yes|no> [default: no]
Whether to report only the first data race that has been
detected on a memory location or all data races that have
been detected on a memory location.
--free-is-write=<yes|no> [default: no]
Whether to report races between accessing memory and freeing
memory. Enabling this option may cause DRD to run slightly
slower. Notes:
• Don't enable this option when using custom memory
allocators that use the VG_USERREQ__MALLOCLIKE_BLOCK and
VG_USERREQ__FREELIKE_BLOCK because that would result in
false positives.
• Don't enable this option when using reference-counted
objects because that will result in false positives, even
when that code has been annotated properly with
ANNOTATE_HAPPENS_BEFORE and ANNOTATE_HAPPENS_AFTER. See
e.g. the output of the following command for an example:
valgrind --tool=drd --free-is-write=yes
drd/tests/annotate_smart_pointer.
--report-signal-unlocked=<yes|no> [default: yes]
Whether to report calls to pthread_cond_signal
and
pthread_cond_broadcast
where the mutex associated with the
signal through pthread_cond_wait
or pthread_cond_timed_wait
is
not locked at the time the signal is sent. Sending a signal
without holding a lock on the associated mutex is a common
programming error which can cause subtle race conditions and
unpredictable behavior. There exist some uncommon
synchronization patterns however where it is safe to send a
signal without holding a lock on the associated mutex.
--segment-merging=<yes|no> [default: yes]
Controls segment merging. Segment merging is an algorithm to
limit memory usage of the data race detection algorithm.
Disabling segment merging may improve the accuracy of the
so-called 'other segments' displayed in race reports but can
also trigger an out of memory error.
--segment-merging-interval=<n> [default: 10]
Perform segment merging only after the specified number of
new segments have been created. This is an advanced
configuration option that allows one to choose whether to
minimize DRD's memory usage by choosing a low value or to let
DRD run faster by choosing a slightly higher value. The
optimal value for this parameter depends on the program being
analyzed. The default value works well for most programs.
--shared-threshold=<n> [default: off]
Print an error message if a reader lock has been held longer
than the specified time (in milliseconds). This option
enables the detection of lock contention.
--show-confl-seg=<yes|no> [default: yes]
Show conflicting segments in race reports. Since this
information can help to find the cause of a data race, this
option is enabled by default. Disabling this option makes the
output of DRD more compact.
--show-stack-usage=<yes|no> [default: no]
Print stack usage at thread exit time. When a program creates
a large number of threads it becomes important to limit the
amount of virtual memory allocated for thread stacks. This
option makes it possible to observe how much stack memory has
been used by each thread of the client program. Note: the DRD
tool itself allocates some temporary data on the client
thread stack. The space necessary for this temporary data
must be allocated by the client program when it allocates
stack memory, but is not included in stack usage reported by
DRD.
--ignore-thread-creation=<yes|no> [default: no]
Controls whether all activities during thread creation should
be ignored. By default enabled only on Solaris. Solaris
provides higher throughput, parallelism and scalability than
other operating systems, at the cost of more fine-grained
locking activity. This means for example that when a thread
is created under glibc, just one big lock is used for all
thread setup. Solaris libc uses several fine-grained locks
and the creator thread resumes its activities as soon as
possible, leaving for example stack and TLS setup sequence to
the created thread. This situation confuses DRD as it assumes
there is some false ordering in place between creator and
created thread; and therefore many types of race conditions
in the application would not be reported. To prevent such
false ordering, this command line option is set to yes by
default on Solaris. All activity (loads, stores, client
requests) is therefore ignored during:
• pthread_create() call in the creator thread
• thread creation phase (stack and TLS setup) in the
created thread
--trace-addr=<address> [default: none]
Trace all load and store activity for the specified address.
This option may be specified more than once.
--ptrace-addr=<address> [default: none]
Trace all load and store activity for the specified address
and keep doing that even after the memory at that address has
been freed and reallocated.
--trace-alloc=<yes|no> [default: no]
Trace all memory allocations and deallocations. May produce a
huge amount of output.
--trace-barrier=<yes|no> [default: no]
Trace all barrier activity.
--trace-cond=<yes|no> [default: no]
Trace all condition variable activity.
--trace-fork-join=<yes|no> [default: no]
Trace all thread creation and all thread termination events.
--trace-hb=<yes|no> [default: no]
Trace execution of the ANNOTATE_HAPPENS_BEFORE(),
ANNOTATE_HAPPENS_AFTER() and ANNOTATE_HAPPENS_DONE() client
requests.
--trace-mutex=<yes|no> [default: no]
Trace all mutex activity.
--trace-rwlock=<yes|no> [default: no]
Trace all reader-writer lock activity.
--trace-semaphore=<yes|no> [default: no]
Trace all semaphore activity.