From ba58e4add3bb2e924b0078146fdcd9b4f6158178 Mon Sep 17 00:00:00 2001 From: Frank Busse Date: Fri, 7 Jan 2022 16:28:17 +0000 Subject: stats: rename States -> ActiveStates, add States --- lib/Core/ExecutionState.h | 1 + lib/Core/StatsTracker.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/Core') diff --git a/lib/Core/ExecutionState.h b/lib/Core/ExecutionState.h index 6d6336dd..dbe02fd9 100644 --- a/lib/Core/ExecutionState.h +++ b/lib/Core/ExecutionState.h @@ -281,6 +281,7 @@ public: std::uint32_t getID() const { return id; }; void setID() { id = nextID++; }; + static std::uint32_t getLastID() { return nextID - 1; }; }; struct ExecutionStateIDCompare { diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp index bc40afd9..51a0b73c 100644 --- a/lib/Core/StatsTracker.cpp +++ b/lib/Core/StatsTracker.cpp @@ -457,6 +457,7 @@ void StatsTracker::writeStatsHeader() { << "InhibitedForks INTEGER," << "ExternalCalls INTEGER," << "Allocations INTEGER," + << "States INTEGER," << "ArrayHashTime INTEGER" << ')'; char *zErrMsg = nullptr; @@ -496,6 +497,7 @@ void StatsTracker::writeStatsHeader() { << "InhibitedForks," << "ExternalCalls," << "Allocations," + << "States," << "ArrayHashTime" << ") VALUES (" << "?," @@ -523,6 +525,7 @@ void StatsTracker::writeStatsHeader() { << "?," << "?," << "?," + << "?," << "? " << ')'; @@ -561,10 +564,11 @@ void StatsTracker::writeStatsLine() { sqlite3_bind_int64(insertStmt, 23, stats::inhibitedForks); sqlite3_bind_int64(insertStmt, 24, stats::externalCalls); sqlite3_bind_int64(insertStmt, 25, stats::allocations); + sqlite3_bind_int64(insertStmt, 26, ExecutionState::getLastID()); #ifdef KLEE_ARRAY_DEBUG - sqlite3_bind_int64(insertStmt, 26, stats::arrayHashTime); + sqlite3_bind_int64(insertStmt, 27, stats::arrayHashTime); #else - sqlite3_bind_int64(insertStmt, 26, -1LL); + sqlite3_bind_int64(insertStmt, 27, -1LL); #endif int errCode = sqlite3_step(insertStmt); if(errCode != SQLITE_DONE) klee_error("Error writing stats data: %s", sqlite3_errmsg(statsFile)); -- cgit 1.4.1