From 56edf12a40cdb2658701485528d80a4324abe827 Mon Sep 17 00:00:00 2001 From: Timotej Kapus Date: Fri, 25 May 2018 17:20:34 +0100 Subject: Change the .stats format into sqlite3 Improves querying of the .stats file, reduces its size, speeds up reads and writes and has better defined fail behaviour. --- lib/Core/StatsTracker.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/Core/StatsTracker.h') diff --git a/lib/Core/StatsTracker.h b/lib/Core/StatsTracker.h index 88e4cf30..f09f7638 100644 --- a/lib/Core/StatsTracker.h +++ b/lib/Core/StatsTracker.h @@ -15,6 +15,7 @@ #include #include +#include namespace llvm { class BranchInst; @@ -38,7 +39,11 @@ namespace klee { Executor &executor; std::string objectFilename; - std::unique_ptr statsFile, istatsFile; + std::unique_ptr istatsFile; + sqlite3 *statsFile; + sqlite3_stmt *insertStmt; + unsigned writeCount; + unsigned commitEvery; time::Point startWallTime; unsigned numBranches; @@ -61,7 +66,7 @@ namespace klee { public: StatsTracker(Executor &_executor, std::string _objectFilename, bool _updateMinDistToUncovered); - ~StatsTracker() = default; + ~StatsTracker(); // called after a new StackFrame has been pushed (for callpath tracing) void framePushed(ExecutionState &es, StackFrame *parentFrame); -- cgit 1.4.1