klee
klee::StatsTracker Class Reference

#include <StatsTracker.h>

Collaboration diagram for klee::StatsTracker:

Public Member Functions

 StatsTracker (Executor &_executor, std::string _objectFilename, bool _updateMinDistToUncovered)
 
 ~StatsTracker ()
 
 StatsTracker (const StatsTracker &other)=delete
 
 StatsTracker (StatsTracker &&other) noexcept=delete
 
StatsTrackeroperator= (const StatsTracker &other)=delete
 
StatsTrackeroperator= (StatsTracker &&other) noexcept=delete
 
void framePushed (ExecutionState &es, StackFrame *parentFrame)
 
void framePopped (ExecutionState &es)
 
void markBranchVisited (ExecutionState *visitedTrue, ExecutionState *visitedFalse)
 
void done ()
 
void stepInstruction (ExecutionState &es)
 
time::Span elapsed ()
 Return duration since execution start. More...
 
void computeReachableUncovered ()
 

Static Public Member Functions

static bool useStatistics ()
 
static bool useIStats ()
 

Private Member Functions

void updateStateStatistics (uint64_t addend)
 
void writeStatsHeader ()
 
void writeStatsLine ()
 
void writeIStats ()
 

Private Attributes

Executorexecutor
 
std::string objectFilename
 
std::unique_ptr< llvm::raw_fd_ostream > istatsFile
 
::sqlite3 * statsFile = nullptr
 
::sqlite3_stmt * transactionBeginStmt = nullptr
 
::sqlite3_stmt * transactionEndStmt = nullptr
 
::sqlite3_stmt * insertStmt = nullptr
 
std::uint32_t statsCommitEvery
 
std::uint32_t statsWriteCount = 0
 
time::Point startWallTime
 
unsigned numBranches
 
unsigned fullBranches
 
unsigned partialBranches
 
CallPathManager callPathManager
 
bool updateMinDistToUncovered
 

Friends

class WriteStatsTimer
 
class WriteIStatsTimer
 

Detailed Description

Definition at line 35 of file StatsTracker.h.

Constructor & Destructor Documentation

◆ StatsTracker() [1/3]

◆ ~StatsTracker()

StatsTracker::~StatsTracker ( )

Definition at line 302 of file StatsTracker.cpp.

References insertStmt, klee::klee_warning(), statsFile, transactionBeginStmt, and transactionEndStmt.

Here is the call graph for this function:

◆ StatsTracker() [2/3]

klee::StatsTracker::StatsTracker ( const StatsTracker other)
delete

◆ StatsTracker() [3/3]

klee::StatsTracker::StatsTracker ( StatsTracker &&  other)
deletenoexcept

Member Function Documentation

◆ computeReachableUncovered()

◆ done()

void StatsTracker::done ( )

Definition at line 316 of file StatsTracker.cpp.

References computeReachableUncovered(), istatsFile, statsFile, updateMinDistToUncovered, writeIStats(), and writeStatsLine().

Referenced by klee::Executor::prepareForEarlyExit(), and klee::Executor::runFunctionAsMain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ elapsed()

time::Span StatsTracker::elapsed ( )

Return duration since execution start.

Definition at line 525 of file StatsTracker.cpp.

References klee::time::getWallTime(), and startWallTime.

Referenced by writeStatsLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ framePopped()

void StatsTracker::framePopped ( ExecutionState es)

Definition at line 413 of file StatsTracker.cpp.

Referenced by klee::Executor::executeInstruction(), and klee::Executor::unwindToNextLandingpad().

Here is the caller graph for this function:

◆ framePushed()

◆ markBranchVisited()

void StatsTracker::markBranchVisited ( ExecutionState visitedTrue,
ExecutionState visitedFalse 
)

◆ operator=() [1/2]

StatsTracker & klee::StatsTracker::operator= ( const StatsTracker other)
delete

◆ operator=() [2/2]

StatsTracker & klee::StatsTracker::operator= ( StatsTracker &&  other)
deletenoexcept

◆ stepInstruction()

◆ updateStateStatistics()

void StatsTracker::updateStateStatistics ( uint64_t  addend)
private

◆ useIStats()

bool StatsTracker::useIStats ( )
static

Definition at line 125 of file StatsTracker.cpp.

Referenced by klee::Executor::Executor().

Here is the caller graph for this function:

◆ useStatistics()

bool StatsTracker::useStatistics ( )
static

Definition at line 121 of file StatsTracker.cpp.

Referenced by klee::Executor::setModule(), and StatsTracker().

Here is the caller graph for this function:

◆ writeIStats()

◆ writeStatsHeader()

void StatsTracker::writeStatsHeader ( )
private

Definition at line 441 of file StatsTracker.cpp.

References insertStmt, klee::klee_error(), sqlite3ErrToStringAndFree(), and statsFile.

Referenced by StatsTracker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeStatsLine()

Friends And Related Function Documentation

◆ WriteIStatsTimer

friend class WriteIStatsTimer
friend

Definition at line 37 of file StatsTracker.h.

◆ WriteStatsTimer

friend class WriteStatsTimer
friend

Definition at line 36 of file StatsTracker.h.

Member Data Documentation

◆ callPathManager

CallPathManager klee::StatsTracker::callPathManager
private

Definition at line 54 of file StatsTracker.h.

Referenced by framePushed(), and writeIStats().

◆ executor

Executor& klee::StatsTracker::executor
private

◆ fullBranches

unsigned klee::StatsTracker::fullBranches
private

Definition at line 52 of file StatsTracker.h.

Referenced by markBranchVisited(), and writeStatsLine().

◆ insertStmt

::sqlite3_stmt* klee::StatsTracker::insertStmt = nullptr
private

Definition at line 46 of file StatsTracker.h.

Referenced by writeStatsHeader(), writeStatsLine(), and ~StatsTracker().

◆ istatsFile

std::unique_ptr<llvm::raw_fd_ostream> klee::StatsTracker::istatsFile
private

Definition at line 42 of file StatsTracker.h.

Referenced by done(), StatsTracker(), stepInstruction(), and writeIStats().

◆ numBranches

unsigned klee::StatsTracker::numBranches
private

Definition at line 51 of file StatsTracker.h.

Referenced by StatsTracker(), and writeStatsLine().

◆ objectFilename

std::string klee::StatsTracker::objectFilename
private

Definition at line 40 of file StatsTracker.h.

Referenced by StatsTracker(), and writeIStats().

◆ partialBranches

unsigned klee::StatsTracker::partialBranches
private

Definition at line 52 of file StatsTracker.h.

Referenced by markBranchVisited(), and writeStatsLine().

◆ startWallTime

time::Point klee::StatsTracker::startWallTime
private

Definition at line 49 of file StatsTracker.h.

Referenced by elapsed().

◆ statsCommitEvery

std::uint32_t klee::StatsTracker::statsCommitEvery
private

Definition at line 47 of file StatsTracker.h.

Referenced by StatsTracker(), and writeStatsLine().

◆ statsFile

::sqlite3* klee::StatsTracker::statsFile = nullptr
private

◆ statsWriteCount

std::uint32_t klee::StatsTracker::statsWriteCount = 0
private

Definition at line 48 of file StatsTracker.h.

Referenced by writeStatsLine().

◆ transactionBeginStmt

::sqlite3_stmt* klee::StatsTracker::transactionBeginStmt = nullptr
private

Definition at line 44 of file StatsTracker.h.

Referenced by StatsTracker(), writeStatsLine(), and ~StatsTracker().

◆ transactionEndStmt

::sqlite3_stmt* klee::StatsTracker::transactionEndStmt = nullptr
private

Definition at line 45 of file StatsTracker.h.

Referenced by StatsTracker(), writeStatsLine(), and ~StatsTracker().

◆ updateMinDistToUncovered

bool klee::StatsTracker::updateMinDistToUncovered
private

Definition at line 56 of file StatsTracker.h.

Referenced by done(), framePushed(), and StatsTracker().


The documentation for this class was generated from the following files: