diff options
| author | Julian Büning <julian.buening@rwth-aachen.de> | 2018-10-03 14:42:37 +0200 |
|---|---|---|
| committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-10-23 18:57:53 +0300 |
| commit | 2b34877c5dbf24eabf331a124b1e68d901a72cba (patch) | |
| tree | 4d6f4a753d9d36a18c482cf0c8d4b8dc550bafb8 /lib/Core/StatsTracker.h | |
| parent | d032742a963e7d8e83dad509dd1c95b4e1a34436 (diff) | |
| download | klee-2b34877c5dbf24eabf331a124b1e68d901a72cba.tar.gz | |
refactor klee_open_output_file to return std::unique_ptr
and introduce klee_open_compressed_output_file with similar behavior along some other minor improvements
Diffstat (limited to 'lib/Core/StatsTracker.h')
| -rw-r--r-- | lib/Core/StatsTracker.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Core/StatsTracker.h b/lib/Core/StatsTracker.h index 23abac06..e352bb91 100644 --- a/lib/Core/StatsTracker.h +++ b/lib/Core/StatsTracker.h @@ -12,6 +12,7 @@ #include "CallPathManager.h" +#include <memory> #include <set> namespace llvm { @@ -23,7 +24,7 @@ namespace llvm { namespace klee { class ExecutionState; - class Executor; + class Executor; class InstructionInfoTable; class InterpreterHandler; struct KInstruction; @@ -36,13 +37,13 @@ namespace klee { Executor &executor; std::string objectFilename; - llvm::raw_fd_ostream *statsFile, *istatsFile; + std::unique_ptr<llvm::raw_fd_ostream> statsFile, istatsFile; double startWallTime; - + unsigned numBranches; unsigned fullBranches, partialBranches; - CallPathManager callPathManager; + CallPathManager callPathManager; bool updateMinDistToUncovered; @@ -59,20 +60,20 @@ namespace klee { public: StatsTracker(Executor &_executor, std::string _objectFilename, bool _updateMinDistToUncovered); - ~StatsTracker(); + ~StatsTracker() = default; // called after a new StackFrame has been pushed (for callpath tracing) void framePushed(ExecutionState &es, StackFrame *parentFrame); - // called after a StackFrame has been popped + // called after a StackFrame has been popped void framePopped(ExecutionState &es); // called when some side of a branch has been visited. it is // imperative that this be called when the statistics index is at // the index for the branch itself. - void markBranchVisited(ExecutionState *visitedTrue, + void markBranchVisited(ExecutionState *visitedTrue, ExecutionState *visitedFalse); - + // called when execution is done and stats files should be flushed void done(); |
