Vendor valgrind headers

This is encouraged according to https://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq
This commit is contained in:
2024-02-21 16:15:40 -08:00
parent 28e61340f4
commit 3750aa7b5b
10 changed files with 9197 additions and 23 deletions
+3 -11
View File
@@ -18,10 +18,7 @@
#include <utility>
#include <vector>
#if __has_include(<valgrind/callgrind.h>)
#define CALLGRIND
#include <valgrind/callgrind.h>
#endif
#define DEBUG_VERBOSE 0
@@ -562,13 +559,10 @@ template <class ConflictSetImpl> struct TestDriver {
assert(iter == keys.end());
assert(i == numPointWrites + numRangeWrites);
#ifdef CALLGRIND
CALLGRIND_START_INSTRUMENTATION;
#endif
cs.addWrites(writes, numPointWrites + numRangeWrites);
#ifdef CALLGRIND
CALLGRIND_STOP_INSTRUMENTATION;
#endif
refImpl.addWrites(writes, numPointWrites + numRangeWrites);
oldestVersion = std::max<int64_t>(writeVersion - arbitrary.bounded(10),
@@ -635,13 +629,11 @@ template <class ConflictSetImpl> struct TestDriver {
new (arena) ConflictSet::Result[numPointReads + numRangeReads];
auto *results2 =
new (arena) ConflictSet::Result[numPointReads + numRangeReads];
#ifdef CALLGRIND
CALLGRIND_START_INSTRUMENTATION;
#endif
cs.check(reads, results1, numPointReads + numRangeReads);
#ifdef CALLGRIND
CALLGRIND_STOP_INSTRUMENTATION;
#endif
refImpl.check(reads, results2, numPointReads + numRangeReads);
for (int i = 0; i < numPointReads + numRangeReads; ++i) {
if (results1[i] != results2[i]) {