klee
|
#include <StatsTracker.h>
Public Member Functions | |
StatsTracker (Executor &_executor, std::string _objectFilename, bool _updateMinDistToUncovered) | |
~StatsTracker () | |
StatsTracker (const StatsTracker &other)=delete | |
StatsTracker (StatsTracker &&other) noexcept=delete | |
StatsTracker & | operator= (const StatsTracker &other)=delete |
StatsTracker & | operator= (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 | |
Executor & | executor |
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 |
Definition at line 35 of file StatsTracker.h.
StatsTracker::StatsTracker | ( | Executor & | _executor, |
std::string | _objectFilename, | ||
bool | _updateMinDistToUncovered | ||
) |
Definition at line 165 of file StatsTracker.cpp.
References klee::TimerGroup::add(), computeReachableUncovered(), executor, klee::KModule::functions, klee::InterpreterHandler::getOutputFilename(), klee::InstructionInfo::id, klee::KInstruction::info, klee::KModule::infos, klee::KInstruction::inst, instructionIsCoverable(), klee::KFunction::instructions, klee::Executor::interpreterHandler, istatsFile, klee::klee_error(), klee::klee_warning(), klee::Executor::kmodule, numBranches, klee::KFunction::numInstructions, objectFilename, klee::InterpreterHandler::openOutputFile(), klee::StatisticManager::setIndex(), sqlite3ErrToStringAndFree(), statsCommitEvery, statsFile, klee::theStatisticManager, klee::Executor::timers, klee::KFunction::trackCoverage, transactionBeginStmt, transactionEndStmt, klee::stats::uncoveredInstructions, updateMinDistToUncovered, klee::StatisticManager::useIndexedStats(), klee::userSearcherRequiresMD2U(), useStatistics(), writeIStats(), writeStatsHeader(), and writeStatsLine().
StatsTracker::~StatsTracker | ( | ) |
Definition at line 302 of file StatsTracker.cpp.
References insertStmt, klee::klee_warning(), statsFile, transactionBeginStmt, and transactionEndStmt.
|
delete |
|
deletenoexcept |
void StatsTracker::computeReachableUncovered | ( | ) |
Definition at line 777 of file StatsTracker.cpp.
References callTargets, klee::computeMinDistToUncovered(), klee::KModule::escapingFunctions, executor, functionCallers, functionShortestPath, klee::getDirectCallTarget(), klee::InstructionInfoTable::getFunctionInfo(), klee::StatisticManager::getIndexedValue(), klee::InstructionInfoTable::getInfo(), getSuccs(), klee::InstructionInfo::id, klee::FunctionInfo::id, klee::KModule::infos, klee::stats::instructions, klee::Executor::kmodule, klee::stats::minDistToReturn, klee::stats::minDistToUncovered, klee::KModule::module, klee::ExecutionState::pc, klee::StatisticManager::setIndexedValue(), klee::ExecutionState::stack, klee::Executor::states, klee::theStatisticManager, and klee::stats::uncoveredInstructions.
Referenced by done(), and StatsTracker().
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().
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().
void StatsTracker::framePopped | ( | ExecutionState & | es | ) |
Definition at line 413 of file StatsTracker.cpp.
Referenced by klee::Executor::executeInstruction(), and klee::Executor::unwindToNextLandingpad().
void StatsTracker::framePushed | ( | ExecutionState & | es, |
StackFrame * | parentFrame | ||
) |
Definition at line 386 of file StatsTracker.cpp.
References klee::StackFrame::caller, callPathManager, klee::StackFrame::callPathNode, klee::computeMinDistToUncovered(), klee::CallPathNode::count, klee::KFunction::function, klee::CallPathManager::getCallPath(), klee::KInstruction::inst, klee::StackFrame::kf, klee::StackFrame::minDistToUncoveredOnReturn, klee::ExecutionState::stack, and updateMinDistToUncovered.
Referenced by klee::Executor::executeCall(), klee::Executor::runFunctionAsMain(), and klee::Executor::unwindToNextLandingpad().
void StatsTracker::markBranchVisited | ( | ExecutionState * | visitedTrue, |
ExecutionState * | visitedFalse | ||
) |
Definition at line 417 of file StatsTracker.cpp.
References klee::ExecutionState::coveredNew, klee::stats::falseBranches, fullBranches, klee::StatisticManager::getIndex(), klee::StatisticManager::getIndexedValue(), klee::ExecutionState::instsSinceCovNew, partialBranches, klee::theStatisticManager, and klee::stats::trueBranches.
Referenced by klee::Executor::executeInstruction().
|
delete |
|
deletenoexcept |
void StatsTracker::stepInstruction | ( | ExecutionState & | es | ) |
Definition at line 328 of file StatsTracker.cpp.
References klee::StackFrame::callPathNode, klee::stats::coveredInstructions, klee::ExecutionState::coveredLines, klee::ExecutionState::coveredNew, klee::InstructionInfo::file, klee::StatisticManager::getIndexedValue(), klee::time::getUserTime(), klee::Statistic::getValue(), klee::time::getWallTime(), klee::InstructionInfo::id, klee::KInstruction::info, klee::KInstruction::inst, instructionIsCoverable(), klee::stats::instructionRealTime, klee::stats::instructions, klee::stats::instructionTime, klee::ExecutionState::instsSinceCovNew, istatsFile, klee::StackFrame::kf, klee::InstructionInfo::line, klee::ExecutionState::pc, klee::StatisticManager::setContext(), klee::StatisticManager::setIndex(), klee::ExecutionState::stack, klee::CallPathNode::statistics, statsFile, klee::theStatisticManager, klee::KFunction::trackCoverage, klee::stats::uncoveredInstructions, writeIStats(), and writeStatsLine().
Referenced by klee::Executor::stepInstruction().
|
private |
Definition at line 571 of file StatsTracker.cpp.
References executor, klee::InstructionInfo::id, klee::StatisticManager::incrementIndexedValue(), klee::KInstruction::info, klee::ExecutionState::pc, klee::ExecutionState::stack, klee::stats::states, klee::Executor::states, and klee::theStatisticManager.
Referenced by writeIStats().
|
static |
Definition at line 125 of file StatsTracker.cpp.
Referenced by klee::Executor::Executor().
|
static |
Definition at line 121 of file StatsTracker.cpp.
Referenced by klee::Executor::setModule(), and StatsTracker().
|
private |
Definition at line 582 of file StatsTracker.cpp.
References klee::InstructionInfo::assemblyLine, klee::FunctionInfo::assemblyLine, callPathManager, klee::CallSiteInfo::count, executor, klee::InstructionInfo::file, klee::FunctionInfo::file, klee::Statistic::getID(), klee::StatisticManager::getIndexedValue(), klee::Statistic::getName(), klee::StatisticManager::getNumStatistics(), klee::Statistic::getShortName(), klee::StatisticManager::getStatistic(), klee::StatisticManager::getStatisticID(), klee::CallPathManager::getSummaryStatistics(), klee::StatisticRecord::getValue(), klee::InstructionInfo::id, istatsFile, klee::Executor::kmodule, klee::InstructionInfo::line, klee::FunctionInfo::line, objectFilename, klee::stats::states, klee::CallSiteInfo::statistics, klee::theStatisticManager, klee::stats::uncoveredInstructions, and updateStateStatistics().
Referenced by done(), StatsTracker(), and stepInstruction().
|
private |
Definition at line 441 of file StatsTracker.cpp.
References insertStmt, klee::klee_error(), sqlite3ErrToStringAndFree(), and statsFile.
Referenced by StatsTracker().
|
private |
Definition at line 529 of file StatsTracker.cpp.
References klee::stats::cexCacheTime, klee::stats::coveredInstructions, elapsed(), executor, klee::stats::forkTime, fullBranches, klee::util::GetTotalMallocUsage(), klee::MemoryManager::getUsedDeterministicSize(), klee::time::getUserTime(), insertStmt, klee::stats::instructions, klee::klee_error(), klee::klee_warning(), klee::Executor::memory, numBranches, partialBranches, klee::stats::queries, klee::stats::queryCexCacheHits, klee::stats::queryCexCacheMisses, klee::stats::queryConstructs, klee::stats::queryTime, klee::stats::resolveTime, klee::stats::solverTime, klee::Executor::states, statsCommitEvery, statsFile, statsWriteCount, transactionBeginStmt, transactionEndStmt, and klee::stats::uncoveredInstructions.
Referenced by done(), StatsTracker(), and stepInstruction().
|
friend |
Definition at line 37 of file StatsTracker.h.
|
friend |
Definition at line 36 of file StatsTracker.h.
|
private |
Definition at line 54 of file StatsTracker.h.
Referenced by framePushed(), and writeIStats().
|
private |
Definition at line 39 of file StatsTracker.h.
Referenced by computeReachableUncovered(), StatsTracker(), updateStateStatistics(), writeIStats(), and writeStatsLine().
|
private |
Definition at line 52 of file StatsTracker.h.
Referenced by markBranchVisited(), and writeStatsLine().
|
private |
Definition at line 46 of file StatsTracker.h.
Referenced by writeStatsHeader(), writeStatsLine(), and ~StatsTracker().
|
private |
Definition at line 42 of file StatsTracker.h.
Referenced by done(), StatsTracker(), stepInstruction(), and writeIStats().
|
private |
Definition at line 51 of file StatsTracker.h.
Referenced by StatsTracker(), and writeStatsLine().
|
private |
Definition at line 40 of file StatsTracker.h.
Referenced by StatsTracker(), and writeIStats().
|
private |
Definition at line 52 of file StatsTracker.h.
Referenced by markBranchVisited(), and writeStatsLine().
|
private |
Definition at line 49 of file StatsTracker.h.
Referenced by elapsed().
|
private |
Definition at line 47 of file StatsTracker.h.
Referenced by StatsTracker(), and writeStatsLine().
|
private |
Definition at line 43 of file StatsTracker.h.
Referenced by done(), StatsTracker(), stepInstruction(), writeStatsHeader(), writeStatsLine(), and ~StatsTracker().
|
private |
Definition at line 48 of file StatsTracker.h.
Referenced by writeStatsLine().
|
private |
Definition at line 44 of file StatsTracker.h.
Referenced by StatsTracker(), writeStatsLine(), and ~StatsTracker().
|
private |
Definition at line 45 of file StatsTracker.h.
Referenced by StatsTracker(), writeStatsLine(), and ~StatsTracker().
|
private |
Definition at line 56 of file StatsTracker.h.
Referenced by done(), framePushed(), and StatsTracker().