44 &&
"PTAStat: unknown clock type!");
54 clock_gettime(CLOCK_MONOTONIC, &time);
55 return (
double)(time.tv_nsec + time.tv_sec * 1000000000) / 1000000.0;
62 assert(
false &&
"PTAStat::getClk: unknown clock type");
76 SVFUtil::outs() <<
"\n*********" << statname <<
"***************\n";
79 unsigned field_width = 20;
84 std::cout << std::setw(field_width) << it->first << it->second <<
"\n";
88 SVFUtil::outs() <<
"----------------Time and memory stats--------------------\n";
92 SVFUtil::outs() << std::setw(field_width) << it->first << it->second <<
"\n";
96 SVFUtil::outs() <<
"----------------Numbers stats----------------------------\n";
100 SVFUtil::outs() << std::setw(field_width) << it->first << it->second <<
"\n";
102 SVFUtil::outs() <<
"#######################################################" << std::endl;
117 u32_t numOfFunction = 0;
118 u32_t numOfGlobal = 0;
119 u32_t numOfStack = 0;
121 u32_t numOfHasVarArray = 0;
122 u32_t numOfHasVarStruct = 0;
123 u32_t numOfHasConstArray = 0;
124 u32_t numOfHasConstStruct = 0;
125 u32_t numOfScalar = 0;
126 u32_t numOfConstant = 0;
127 u32_t fiObjNumber = 0;
128 u32_t fsObjNumber = 0;
133 if(
ObjVar* obj = SVFUtil::dyn_cast<ObjVar>(node))
135 const MemObj* mem = obj->getMemObj();
136 if (memObjSet.insert(mem->
getId()).second ==
false)
153 numOfHasConstArray++;
155 numOfHasConstStruct++;
217 u32_t numOfBB_2Succ = 0;
218 u32_t numOfBB_3Succ = 0;
220 for (
const auto&
item: *svfirCallGraph)
224 bbIt != bbEit; ++bbIt)
230 else if (numOfSucc > 2)
iterator begin()
Iterators.
IDToNodeMapTy::iterator iterator
Node Iterators.
u32_t getValueNodeNum() const
u32_t getPTAPAGEdgeNum() const
u32_t getPAGEdgeNum() const
u32_t getObjectNodeNum() const
bool isConstantStruct() const
const SVFType * getType() const
Get obj type.
bool isConstDataOrConstGlobal() const
SymID getId() const
Get the memory object id.
bool isFieldInsensitive() const
Return true if its field limit is 0.
bool isBlackHoleObj() const
Whether it is a black hole object.
bool isConstantArray() const
bool isFunction() const
object attributes methods
static const OptionMap< enum PTAStat::ClockType > ClockType
static const Option< bool > MarkedClocksOnly
u32_t getNumSuccessors() const
const_iterator end() const
const_iterator begin() const
std::vector< const SVFBasicBlock * >::const_iterator const_iterator
PTACallGraph * getCallGraph()
const CallSiteToFunPtrMap & getIndirectCallsites() const
Add/get indirect callsites.
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
u32_t getFieldObjNodeNum() const
u32_t getFieldValNodeNum() const
Node and edge statistics.
const CallSiteSet & getCallSiteSet() const
Get all callsites.
SVFStmt::SVFStmtSetTy & getSVFStmtSet(SVFStmt::PEDGEK kind)
Get/set methods to get SVFStmts based on their kinds and ICFGNodes.
virtual void printStat(std::string str="")
static bool printGeneralStats
SVF's general statistics are only printed once even if you run multiple anayses.
virtual void performStat()=0
static double timeOfBuildingLLVMModule
static double getClk(bool mark=false)
static double timeOfBuildingSymbolTable
static double timeOfBuildingSVFIR
static SymbolTableInfo * SymbolInfo()
Singleton design here to make sure we only have one instance during any analysis.
u32_t getMaxStructSize() const
std::vector< std::string > split(const std::string &s, char separator)
Split into two substrings around the first occurrence of a separator string.
std::ostream & outs()
Overwrite llvm::outs()
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set