Sema: Track solver arena size in statistics

This commit is contained in:
Slava Pestov
2025-03-10 14:03:05 -04:00
parent a7a19a0915
commit ada6f77655
2 changed files with 5 additions and 0 deletions

View File

@@ -669,6 +669,10 @@ ConstraintSystem::SolverState::~SolverState() {
CS.Options -= ConstraintSystemFlags::DebugConstraints;
}
// This statistic is special because it's not a counter; we just update
// it in one shot at the end.
ASTBytesAllocated = CS.getASTContext().getSolverMemory();
// Write our local statistics back to the overall statistics.
#define CS_STATISTIC(Name, Description) JOIN2(Overall,Name) += Name;
#include "swift/Sema/ConstraintSolverStats.def"