本文整理汇总了C++中ExecutionState::setCoveredNew方法的典型用法代码示例。如果您正苦于以下问题:C++ ExecutionState::setCoveredNew方法的具体用法?C++ ExecutionState::setCoveredNew怎么用?C++ ExecutionState::setCoveredNew使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExecutionState
的用法示例。
在下文中一共展示了ExecutionState::setCoveredNew方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stepInstruction
void StatsTracker::stepInstruction(ExecutionState &es) {
if (OutputIStats) {
if (TrackInstructionTime) {
static sys::TimeValue lastNowTime(0, 0), lastUserTime(0, 0);
if (lastUserTime.seconds() == 0 && lastUserTime.nanoseconds() == 0) {
sys::TimeValue sys(0, 0);
sys::Process::GetTimeUsage(lastNowTime, lastUserTime, sys);
} else {
sys::TimeValue now(0, 0), user(0, 0), sys(0, 0);
sys::Process::GetTimeUsage(now, user, sys);
sys::TimeValue delta = user - lastUserTime;
sys::TimeValue deltaNow = now - lastNowTime;
stats::instructionTime += delta.usec();
stats::instructionRealTime += deltaNow.usec();
lastUserTime = user;
lastNowTime = now;
}
}
Instruction *inst = es.pc()->inst;
const InstructionInfo &ii = *es.pc()->info;
StackFrame &sf = es.stack().back();
theStatisticManager->setIndex(ii.id);
if (UseCallPaths)
theStatisticManager->setContext(&sf.callPathNode->statistics);
if (es.instsSinceCovNew)
++es.instsSinceCovNew;
if (instructionIsCoverable(inst)) {
if (!theStatisticManager->getIndexedValue(
stats::locallyCoveredInstructions, ii.id)) {
// Checking for actual stoppoints avoids inconsistencies due
// to line number propogation.
es.coveredLines[&ii.file].insert(ii.line);
es.setCoveredNew();
es.instsSinceCovNew = 1;
++stats::locallyCoveredInstructions;
stats::locallyUncoveredInstructions += (uint64_t) -1;
if (!theStatisticManager->getIndexedValue(stats::globallyCoveredInstructions, ii.id)) {
++stats::globallyCoveredInstructions;
stats::globallyUncoveredInstructions += (uint64_t) -1;
}
}
}
}
}