Add DebugConflictSet, which asserts using skip list as a reference
Some checks failed
Tests / Clang total: 1090, passed: 1090
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / SIMD fallback total: 1090, passed: 1090
Tests / Release [gcc] total: 1090, passed: 1090
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 818, failed: 1, passed: 817
Tests / Coverage total: 817, passed: 817
weaselab/conflict-set/pipeline/head There was a failure building this commit

CC #23
This commit is contained in:
2024-04-17 12:06:04 -07:00
parent eab2e46a56
commit 309d315956
4 changed files with 60 additions and 6 deletions

View File

@@ -2510,6 +2510,10 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
}
explicit Impl(int64_t oldestVersion) : oldestVersion(oldestVersion) {
#if DEBUG_VERBOSE
fprintf(stderr, "radix_tree: create\n");
#endif
// Insert ""
root = allocators.node0.allocate(0);
root->numChildren = 0;
@@ -2524,7 +2528,12 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
root->entry.pointVersion = oldestVersion;
root->entry.rangeVersion = oldestVersion;
}
~Impl() { destroyTree(root); }
~Impl() {
#if DEBUG_VERBOSE
fprintf(stderr, "radix_tree: destroy\n");
#endif
destroyTree(root);
}
NodeAllocators allocators;
@@ -3005,6 +3014,7 @@ void removeKey(Node *n) {
struct __attribute__((visibility("default"))) PeakPrinter {
~PeakPrinter() {
printf("--- radix_tree ---\n");
printf("malloc bytes: %g\n", double(mallocBytes));
printf("Peak malloc bytes: %g\n", double(peakMallocBytes));
printf("Node bytes: %g\n", double(nodeBytes));