Vendor valgrind headers
All checks were successful
Tests / Release [gcc] total: 583, passed: 583
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap: Reference build: <a href="https://jenkins.weaselab.dev/job/weaselab/job/conflict-set/job/main/31//gcc">weaselab » conflict-set » main #31</a>
Tests / Coverage total: 581, passed: 581
weaselab/conflict-set/pipeline/head This commit looks good

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

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]) {