Compare commits
3
Commits
4ef10b106a
...
ba781b8875
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba781b8875 | ||
|
|
8621662d3c | ||
|
|
9c721bcdca |
No files matched your search
+2
-12
@@ -571,11 +571,7 @@ inline void Node48::copyChildrenAndKeyFrom(const Node16 &other) {
|
||||
}
|
||||
// The reverseIndex bytes beyond numChildren are initialized so that the
|
||||
// SIMD loads of a full 16-byte page in scan16 are well-defined (reading
|
||||
// indeterminate bytes is UB in C++). valgrind then treats them as undefined
|
||||
// so that it can still flag any read that relies on them.
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(reverseIndex + numChildren,
|
||||
sizeof(reverseIndex) -
|
||||
numChildren * sizeof(reverseIndex[0]));
|
||||
// indeterminate bytes is UB in C++).
|
||||
}
|
||||
|
||||
inline void Node48::copyChildrenAndKeyFrom(const Node48 &other) {
|
||||
@@ -626,11 +622,7 @@ inline void Node48::copyChildrenAndKeyFrom(const Node256 &other) {
|
||||
memcpy(partialKey(), &other + 1, partialKeyLen);
|
||||
// The reverseIndex bytes beyond numChildren are initialized so that the
|
||||
// SIMD loads of a full 16-byte page in scan16 are well-defined (reading
|
||||
// indeterminate bytes is UB in C++). valgrind then treats them as undefined
|
||||
// so that it can still flag any read that relies on them.
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(reverseIndex + numChildren,
|
||||
sizeof(reverseIndex) -
|
||||
numChildren * sizeof(reverseIndex[0]));
|
||||
// indeterminate bytes is UB in C++).
|
||||
}
|
||||
|
||||
inline void Node256::copyChildrenAndKeyFrom(const Node48 &other) {
|
||||
@@ -2024,8 +2016,6 @@ Node *erase(Node *self, WriteContext *writeContext, bool logical) {
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent48->children + lastChildrenIndex,
|
||||
sizeof(parent48->children[0]));
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent48->reverseIndex + lastChildrenIndex,
|
||||
sizeof(parent48->reverseIndex[0]));
|
||||
|
||||
if (needsDownsize(parent48)) {
|
||||
downsize(parent48, writeContext);
|
||||
|
||||
@@ -35,36 +35,5 @@ int main(int argc, char **argv) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
ConflictSet::MetricsV1 *metrics;
|
||||
int metricsCount;
|
||||
driver1.cs.getMetricsV1(&metrics, &metricsCount);
|
||||
printf("#################### METRICS for ConflictSet 1 for %s "
|
||||
"####################\n",
|
||||
argv[i]);
|
||||
for (int i = 0; i < metricsCount; ++i) {
|
||||
printf("# HELP %s %s\n", metrics[i].name, metrics[i].help);
|
||||
printf("# TYPE %s %s\n", metrics[i].name,
|
||||
metrics[i].type == metrics[i].Counter ? "counter" : "gauge");
|
||||
printf("%s %g\n", metrics[i].name, metrics[i].getValue());
|
||||
}
|
||||
puts("");
|
||||
}
|
||||
{
|
||||
ConflictSet::MetricsV1 *metrics;
|
||||
int metricsCount;
|
||||
driver2.cs.getMetricsV1(&metrics, &metricsCount);
|
||||
printf("#################### METRICS for ConflictSet 2 for %s "
|
||||
"####################\n",
|
||||
argv[i]);
|
||||
for (int i = 0; i < metricsCount; ++i) {
|
||||
printf("# HELP %s %s\n", metrics[i].name, metrics[i].help);
|
||||
printf("# TYPE %s %s\n", metrics[i].name,
|
||||
metrics[i].type == metrics[i].Counter ? "counter" : "gauge");
|
||||
printf("%s %g\n", metrics[i].name, metrics[i].getValue());
|
||||
}
|
||||
puts("");
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
-10
@@ -84,11 +84,10 @@ struct __attribute__((__visibility__("default"))) ConflictSet {
|
||||
* `WriteRange` (see its field documentation); `count >= 0`; `writeVersion >=
|
||||
* newestVersion`.
|
||||
* @post Writes (writes[i], writeVersion) are recorded for every i < count,
|
||||
* and `newestVersion` becomes `writeVersion`. `oldestVersion` advances as
|
||||
* needed so that `oldestVersion >= newestVersion - two billion`;
|
||||
* `oldestVersion <= newestVersion` is preserved. Calling with `count == 0`
|
||||
* adds no write; `newestVersion` (and possibly `oldestVersion`) still
|
||||
* advance. */
|
||||
* and `newestVersion` becomes `writeVersion`. `oldestVersion` advances only
|
||||
* as far as necessary: it becomes the larger of its previous value and
|
||||
* `newestVersion - two billion`. Calling with `count == 0` adds no write;
|
||||
* `newestVersion` (and possibly `oldestVersion`) still advance. */
|
||||
void addWrites(const WriteRange *writes, int count, int64_t writeVersion);
|
||||
|
||||
/** Reads where readVersion < `oldestVersion` will result in `TooOld`.
|
||||
@@ -231,11 +230,10 @@ void ConflictSet_check(const ConflictSet *cs,
|
||||
* `ConflictSet_WriteRange` (see its field documentation); `count >= 0`;
|
||||
* `writeVersion >= newestVersion`.
|
||||
* @post Writes (writes[i], writeVersion) are recorded for every i < count,
|
||||
* and `newestVersion` becomes `writeVersion`. `oldestVersion` advances as
|
||||
* needed so that `oldestVersion >= newestVersion - two billion`;
|
||||
* `oldestVersion <= newestVersion` is preserved. Calling with `count == 0`
|
||||
* adds no write; `newestVersion` (and possibly `oldestVersion`) still
|
||||
* advance. */
|
||||
* and `newestVersion` becomes `writeVersion`. `oldestVersion` advances only
|
||||
* as far as necessary: it becomes the larger of its previous value and
|
||||
* `newestVersion - two billion`. Calling with `count == 0` adds no write;
|
||||
* `newestVersion` (and possibly `oldestVersion`) still advance. */
|
||||
void ConflictSet_addWrites(ConflictSet *cs,
|
||||
const ConflictSet_WriteRange *writes, int count,
|
||||
int64_t writeVersion);
|
||||
|
||||
Reference in new issue
Block a user