summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Cherkauer <kevin.cherkauer@mongodb.com>2024-04-09 20:10:00 +0000
committerMongoDB Bot <mongo-bot@mongodb.com>2024-04-09 21:11:20 +0000
commit7a6a294286d9df91e5252dc2f8ea177801e859f2 (patch)
treeb43658b6bd264155482047dc143c8edc9df166ff
parent8a88507a6b7e8fc01df7841ef9c9674c59c51ec5 (diff)
SERVER-88951 Performance: change some low-level tasserts to dasserts (#20738)r8.0.0-rc1
(cherry picked from commit a7eccefc2dc9617fcff53658cda418b2e6e78b9d) GitOrigin-RevId: 06ad39f3b186cdd31144ea06f460b605bd5c4221
-rw-r--r--src/mongo/db/exec/sbe/vm/vm_block.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mongo/db/exec/sbe/vm/vm_block.cpp b/src/mongo/db/exec/sbe/vm/vm_block.cpp
index a6d2f4de91b..3cd8c1c3cf1 100644
--- a/src/mongo/db/exec/sbe/vm/vm_block.cpp
+++ b/src/mongo/db/exec/sbe/vm/vm_block.cpp
@@ -328,7 +328,7 @@ FastTuple<bool, value::TypeTags, value::Value> ByteCode::valueBlockMinMaxImpl(
tassert(
8137400, "Expected block and bitset to be the same size", block.count() == bitset.count());
- tassert(8137401, "Expected bitset to be all bools", allBools(bitset.tags(), bitset.count()));
+ dassert(allBools(bitset.tags(), bitset.count()), "Expected bitset to be all bools");
value::TypeTags accTag = value::TypeTags::Nothing;
value::Value accVal = 0;
@@ -489,7 +489,7 @@ FastTuple<bool, value::TypeTags, value::Value> ByteCode::builtinValueBlockAggCou
value::DeblockedTagVals bitset = bitsetBlock->extract();
- tassert(8151800, "Expected bitset to be all bools", allBools(bitset.tags(), bitset.count()));
+ dassert(allBools(bitset.tags(), bitset.count()), "Expected bitset to be all bools");
int64_t n = accTag == value::TypeTags::NumberInt64 ? value::bitcastTo<int64_t>(accVal) : 0;
@@ -535,7 +535,7 @@ FastTuple<bool, value::TypeTags, value::Value> ByteCode::builtinValueBlockAggSum
tassert(
8151801, "Expected block and bitset to be the same size", block.count() == bitset.count());
- tassert(8151802, "Expected bitset to be all bools", allBools(bitset.tags(), bitset.count()));
+ dassert(allBools(bitset.tags(), bitset.count()), "Expected bitset to be all bools");
value::TypeTags blockResTag = value::TypeTags::Nothing;
value::Value blockResVal = 0;
@@ -1079,7 +1079,7 @@ FastTuple<bool, value::TypeTags, value::Value> ByteCode::blockNativeAggTopBottom
}
auto bitset = bitsetBlock->extract();
- tassert(8794903, "Expected bitset to be all bools", allBools(bitset.tags(), bitset.count()));
+ dassert(allBools(bitset.tags(), bitset.count()), "Expected bitset to be all bools");
auto bitsetVals = bitset.valsSpan();
auto sortKeys = sortKeyBlock->extract();
@@ -1292,7 +1292,7 @@ FastTuple<bool, value::TypeTags, value::Value> ByteCode::builtinValueBlockAggTop
value::DeblockedTagVals bitset = bitsetBlock->extract();
- tassert(8448711, "Expected bitset to be all bools", allBools(bitset.tags(), bitset.count()));
+ dassert(allBools(bitset.tags(), bitset.count()), "Expected bitset to be all bools");
std::vector<value::DeblockedTagVals> keys;
std::vector<value::DeblockedTagVals> values;
@@ -2196,9 +2196,8 @@ void ByteCode::valueBlockApplyLambda(const CodeFragment* code) {
tassert(8123000,
"Mask and block have a different number of items",
extracted.count() == extractedMask.count());
- tassert(8123001,
- "Expected mask to be all bool values",
- allBools(extractedMask.tags(), extractedMask.count()));
+ dassert(allBools(extractedMask.tags(), extractedMask.count()),
+ "Expected mask to be all bools");
// Pre-fill with Nothing, and overwrite only the allowed indexes.
std::vector<value::Value> valueOut(extracted.count());