File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1818# error #define CS_STATISTIC(Name, Description) before including
1919#endif
2020
21+ CS_STATISTIC(ASTBytesAllocated, "bytes allocated in solver arena")
2122CS_STATISTIC(NumTypeVariablesBound, "# of type variables bound")
2223CS_STATISTIC(NumTypeVariableBindings, "# of type variable bindings attempted")
2324CS_STATISTIC(NumDisjunctions, "# of disjunctions explored")
Original file line number Diff line number Diff line change @@ -669,6 +669,10 @@ ConstraintSystem::SolverState::~SolverState() {
669669 CS.Options -= ConstraintSystemFlags::DebugConstraints;
670670 }
671671
672+ // This statistic is special because it's not a counter; we just update
673+ // it in one shot at the end.
674+ ASTBytesAllocated = CS.getASTContext ().getSolverMemory ();
675+
672676 // Write our local statistics back to the overall statistics.
673677 #define CS_STATISTIC (Name, Description ) JOIN2(Overall,Name) += Name;
674678 #include " swift/Sema/ConstraintSolverStats.def"
You can’t perform that action at this time.
0 commit comments