Fix up DEBUG_VERBOSE
This commit is contained in:
@@ -3166,6 +3166,7 @@ void eraseInRange(Node *beginNode, Node *endNode, WriteContext *writeContext,
|
|||||||
for (iter = nextLogical(iter); !iter->endOfRange;
|
for (iter = nextLogical(iter); !iter->endOfRange;
|
||||||
iter = erase(iter, writeContext, impl, /*logical*/ true)) {
|
iter = erase(iter, writeContext, impl, /*logical*/ true)) {
|
||||||
assert(!iter->endOfRange);
|
assert(!iter->endOfRange);
|
||||||
|
assert(!iter->releaseDeferred);
|
||||||
}
|
}
|
||||||
assert(iter->endOfRange);
|
assert(iter->endOfRange);
|
||||||
iter->endOfRange = false;
|
iter->endOfRange = false;
|
||||||
@@ -4892,18 +4893,29 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
|
|
||||||
// Phase 2: Perform insertions. Nodes may be upsized during this phase, but
|
// Phase 2: Perform insertions. Nodes may be upsized during this phase, but
|
||||||
// old nodes get forwarding pointers installed and are released after
|
// old nodes get forwarding pointers installed and are released after
|
||||||
// phase 2.
|
// phase 2. The search path of a node does not change in this phase.
|
||||||
|
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
|
||||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||||
fprintf(stderr, "search path: %s, begin: %s\n",
|
{
|
||||||
getSearchPathPrintable(context.results[i].insertionPoint).c_str(),
|
Node *b = context.results[i].insertionPoint;
|
||||||
printable(writes[i].begin).c_str());
|
Node *e = context.results[i].endInsertionPoint;
|
||||||
fprintf(
|
while (b->releaseDeferred) {
|
||||||
stderr, "search path: %s, end: %s\n",
|
b = b->forwardTo;
|
||||||
getSearchPathPrintable(context.results[i].endInsertionPoint).c_str(),
|
}
|
||||||
printable(writes[i].end).c_str());
|
if (e != nullptr) {
|
||||||
|
while (e->releaseDeferred) {
|
||||||
|
e = b->forwardTo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf(stderr, "search path: %s, begin: %s\n",
|
||||||
|
getSearchPathPrintable(b).c_str(),
|
||||||
|
printable(context.results[i].remaining).c_str());
|
||||||
|
fprintf(stderr, "search path: %s, end: %s\n",
|
||||||
|
getSearchPathPrintable(e).c_str(),
|
||||||
|
printable(context.results[i].endRemaining).c_str());
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (context.results[i].insertionPoint->releaseDeferred) {
|
while (context.results[i].insertionPoint->releaseDeferred) {
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ inline std::string printable(const Key &key) {
|
|||||||
return printable(std::string_view((const char *)key.p, key.len));
|
return printable(std::string_view((const char *)key.p, key.len));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string printable(std::span<const uint8_t> key) {
|
inline std::string printable(TrivialSpan key) {
|
||||||
return printable(std::string_view((const char *)key.data(), key.size()));
|
return printable(std::string_view((const char *)key.data(), key.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user