about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/ExecutionState.h1
-rw-r--r--lib/Core/StatsTracker.cpp8
2 files changed, 7 insertions, 2 deletions
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));