about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2022-01-07 14:21:00 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2023-03-23 17:41:08 +0000
commit7b881cd894ce908a4b4e2d2ad89f90e39905905a (patch)
tree9435f3efab1d928440e42261ee47044b52b5dd1e
parentfc3c937892998b984a59cfa740244952ff6071b9 (diff)
downloadklee-7b881cd894ce908a4b4e2d2ad89f90e39905905a.tar.gz
stats: add QCacheHits/Misses
-rw-r--r--lib/Core/StatsTracker.cpp18
-rwxr-xr-xtools/klee-stats/klee-stats6
2 files changed, 17 insertions, 7 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index 18c0a691..0cec4222 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -449,6 +449,8 @@ void StatsTracker::writeStatsHeader() {
              << "CexCacheTime INTEGER,"
              << "ForkTime INTEGER,"
              << "ResolveTime INTEGER,"
+             << "QueryCacheMisses INTEGER,"
+             << "QueryCacheHits INTEGER,"
              << "QueryCexCacheMisses INTEGER,"
              << "QueryCexCacheHits INTEGER,"
              << "InhibitedForks INTEGER,"
@@ -483,6 +485,8 @@ void StatsTracker::writeStatsHeader() {
              << "CexCacheTime,"
              << "ForkTime,"
              << "ResolveTime,"
+             << "QueryCacheMisses,"
+             << "QueryCacheHits,"
              << "QueryCexCacheMisses,"
              << "QueryCexCacheHits,"
              << "InhibitedForks,"
@@ -508,6 +512,8 @@ void StatsTracker::writeStatsHeader() {
              << "?,"
              << "?,"
              << "?,"
+             << "?,"
+             << "?,"
              << "? "
          << ')';
 
@@ -538,13 +544,15 @@ void StatsTracker::writeStatsLine() {
   sqlite3_bind_int64(insertStmt, 15, stats::cexCacheTime);
   sqlite3_bind_int64(insertStmt, 16, stats::forkTime);
   sqlite3_bind_int64(insertStmt, 17, stats::resolveTime);
-  sqlite3_bind_int64(insertStmt, 18, stats::queryCexCacheMisses);
-  sqlite3_bind_int64(insertStmt, 19, stats::queryCexCacheHits);
-  sqlite3_bind_int64(insertStmt, 20, stats::inhibitedForks);
+  sqlite3_bind_int64(insertStmt, 18, stats::queryCacheMisses);
+  sqlite3_bind_int64(insertStmt, 19, stats::queryCacheHits);
+  sqlite3_bind_int64(insertStmt, 20, stats::queryCexCacheMisses);
+  sqlite3_bind_int64(insertStmt, 21, stats::queryCexCacheHits);
+  sqlite3_bind_int64(insertStmt, 22, stats::inhibitedForks);
 #ifdef KLEE_ARRAY_DEBUG
-  sqlite3_bind_int64(insertStmt, 21, stats::arrayHashTime);
+  sqlite3_bind_int64(insertStmt, 23, stats::arrayHashTime);
 #else
-  sqlite3_bind_int64(insertStmt, 21, -1LL);
+  sqlite3_bind_int64(insertStmt, 23, -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 18fbe595..b819f69b 100755
--- a/tools/klee-stats/klee-stats
+++ b/tools/klee-stats/klee-stats
@@ -52,8 +52,10 @@ Legend = [
     ('Queries', 'number of queries issued to the constraint solver', "NumQueries"),
     ('QueryConstructs', 'number of query constructs for all queries send to the constraint solver', "NumQueryConstructs"),
     ('AvgSolverQuerySize', 'average number of query constructs per query issued to the constraint solver', "AvgQC"),
-    ('QCexCMisses', 'Counterexample cache misses', "QueryCexCacheMisses"),
-    ('QCexCHits', 'Counterexample cache hits', "QueryCexCacheHits"),
+    ('QCacheMisses', 'Query cache misses', "QueryCacheMisses"),
+    ('QCacheHits', 'Query cache hits', "QueryCacheHits"),
+    ('QCexCacheMisses', 'Counterexample cache misses', "QueryCexCacheMisses"),
+    ('QCexCacheHits', 'Counterexample cache hits', "QueryCexCacheHits"),
     # - memory
     ('Mem(MiB)', 'mebibytes of memory currently used', "MallocUsage"),
     ('MaxMem(MiB)', 'maximum memory usage', "MaxMem"),