DRD: a thread error detector
• The macro
DRD_STOP_IGNORING_VAR(x)
and the corresponding client request
VG_USERREQ__DRD_FINISH_SUPPRESSION
.
Tell DRD to no longer ignore data races for the address range that was suppressed either via the macro
DRD_IGNORE_VAR(x)
or via the client request
VG_USERREQ__DRD_START_SUPPRESSION
.
• The macro
DRD_TRACE_VAR(x)
. Trace all load and store activity for the address range starting at
&x
and
occupying
sizeof(x)
bytes. When DRD reports a data race on a specified variable, and it’s not immediately
clear which source code statements triggered the conflicting accesses, it can be very helpful to trace all activity on
the offending memory location.
• The macro
DRD_STOP_TRACING_VAR(x)
. Stop tracing load and store activity for the address range starting at
&x
and occupying
sizeof(x)
bytes.
• The macro
ANNOTATE_TRACE_MEMORY(&x)
. Trace all load and store activity that touches at least the single
byte at the address
&x
.
• The client request
VG_USERREQ__DRD_START_TRACE_ADDR
, which allows to trace all load and store activity
for the specified address range.
• The client request
VG_USERREQ__DRD_STOP_TRACE_ADDR
. Do no longer trace load and store activity for the
specified address range.
• The macro
ANNOTATE_HAPPENS_BEFORE(addr)
tells DRD to insert a mark. Insert this macro just after an
access to the variable at the specified address has been performed.
• The macro
ANNOTATE_HAPPENS_AFTER(addr)
tells DRD that the next access to the variable at
the specified address should be considered to have happened after the access just before the latest
ANNOTATE_HAPPENS_BEFORE(addr)
annotation that references the same variable.
The purpose of
these two macros is to tell DRD about the order of inter-thread memory accesses implemented via atomic memory
operations. See also
drd/tests/annotate_smart_pointer.cpp
for an example.
• The macro
ANNOTATE_RWLOCK_CREATE(rwlock)
tells DRD that the object at address
rwlock
is a
reader-writer synchronization object that is not a
pthread_rwlock_t
synchronization object.
See also
drd/tests/annotate_rwlock.c
for an example.
• The macro
ANNOTATE_RWLOCK_DESTROY(rwlock)
tells DRD that the reader-writer synchronization object
at address
rwlock
has been destroyed.
• The macro
ANNOTATE_WRITERLOCK_ACQUIRED(rwlock)
tells DRD that a writer lock has been acquired on
the reader-writer synchronization object at address
rwlock
.
• The macro
ANNOTATE_READERLOCK_ACQUIRED(rwlock)
tells DRD that a reader lock has been acquired on
the reader-writer synchronization object at address
rwlock
.
• The macro
ANNOTATE_RWLOCK_ACQUIRED(rwlock, is_w)
tells DRD that a writer lock (when
is_w !=
0
) or that a reader lock (when
is_w == 0
) has been acquired on the reader-writer synchronization object at
address
rwlock
.
• The macro
ANNOTATE_WRITERLOCK_RELEASED(rwlock)
tells DRD that a writer lock has been released on
the reader-writer synchronization object at address
rwlock
.
• The macro
ANNOTATE_READERLOCK_RELEASED(rwlock)
tells DRD that a reader lock has been released on
the reader-writer synchronization object at address
rwlock
.
• The macro
ANNOTATE_RWLOCK_RELEASED(rwlock, is_w)
tells DRD that a writer lock (when
is_w !=
0
) or that a reader lock (when
is_w == 0
) has been released on the reader-writer synchronization object at address
rwlock
.
129
Содержание BBV
Страница 176: ...Valgrind FAQ Release 3 8 0 10 August 2012 Copyright 2000 2012 Valgrind Developers Email valgrind valgrind org ...
Страница 177: ...Valgrind FAQ Table of Contents Valgrind Frequently Asked Questions 1 ii ...
Страница 302: ...README mips based on newer GCC versions if possible 95 ...
Страница 303: ...GNU Licenses ...
Страница 304: ...GNU Licenses Table of Contents 1 The GNU General Public License 1 2 The GNU Free Documentation License 8 ii ...