about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--lib/Core/StatsTracker.cpp8
-rwxr-xr-xtools/klee-stats/klee-stats1
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index 37a52fff..bc40afd9 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -456,6 +456,7 @@ void StatsTracker::writeStatsHeader() {
              << "QueryCexCacheHits INTEGER,"
              << "InhibitedForks INTEGER,"
              << "ExternalCalls INTEGER,"
+             << "Allocations INTEGER,"
              << "ArrayHashTime INTEGER"
          << ')';
   char *zErrMsg = nullptr;
@@ -494,6 +495,7 @@ void StatsTracker::writeStatsHeader() {
              << "QueryCexCacheHits,"
              << "InhibitedForks,"
              << "ExternalCalls,"
+             << "Allocations,"
              << "ArrayHashTime"
          << ") VALUES ("
              << "?,"
@@ -520,6 +522,7 @@ void StatsTracker::writeStatsHeader() {
              << "?,"
              << "?,"
              << "?,"
+             << "?,"
              << "? "
          << ')';
 
@@ -557,10 +560,11 @@ void StatsTracker::writeStatsLine() {
   sqlite3_bind_int64(insertStmt, 22, stats::queryCexCacheHits);
   sqlite3_bind_int64(insertStmt, 23, stats::inhibitedForks);
   sqlite3_bind_int64(insertStmt, 24, stats::externalCalls);
+  sqlite3_bind_int64(insertStmt, 25, stats::allocations);
 #ifdef KLEE_ARRAY_DEBUG
-  sqlite3_bind_int64(insertStmt, 25, stats::arrayHashTime);
+  sqlite3_bind_int64(insertStmt, 26, stats::arrayHashTime);
 #else
-  sqlite3_bind_int64(insertStmt, 25, -1LL);
+  sqlite3_bind_int64(insertStmt, 26, -1LL);
 #endif
   int errCode = sqlite3_step(insertStmt);
   if(errCode != SQLITE_DONE) klee_error("Error writing stats data: %s", sqlite3_errmsg(statsFile));
diff --git a/tools/klee-stats/klee-stats b/tools/klee-stats/klee-stats
index 5e49587b..b08022f4 100755
--- a/tools/klee-stats/klee-stats
+++ b/tools/klee-stats/klee-stats
@@ -59,6 +59,7 @@ Legend = [
     ('QCexCacheMisses', 'Counterexample cache misses', "QueryCexCacheMisses"),
     ('QCexCacheHits', 'Counterexample cache hits', "QueryCexCacheHits"),
     # - memory
+    ('Allocations', 'number of allocated heap objects of the program under test', "Allocations"),
     ('Mem(MiB)', 'mebibytes of memory currently used', "MallocUsage"),
     ('MaxMem(MiB)', 'maximum memory usage', "MaxMem"),
     ('AvgMem(MiB)', 'average memory usage', "AvgMem"),