AEStat: Statistic for AE.
More...
#include <AEStat.h>
AEStat: Statistic for AE.
Definition at line 35 of file AEStat.h.
◆ AEStat()
Definition at line 39 of file AEStat.h.
40 {
42 }
AbstractInterpretation * _ae
static double getClk(bool mark=false)
◆ ~AEStat()
◆ countStateSize()
| void AEStat::countStateSize |
( |
| ) |
|
◆ finializeStat()
| void AEStat::finializeStat |
( |
| ) |
|
Definition at line 44 of file AEStat.cpp.
45{
48 {
53 }
55
56 u32_t totalICFGNodes =
_ae->pag->getICFG()->nodeNum;
58
59
60 u32_t analyzedNodes =
_ae->allAnalyzedNodes.size();
62
63
64 if (totalICFGNodes > 0)
65 {
66 double coveragePercent = (double)analyzedNodes / (double)totalICFGNodes * 100.0;
68 }
69 else
70 {
72 }
73
74 u32_t callSiteNum = 0;
75 u32_t extCallSiteNum = 0;
78 for (
const auto &it: *
_ae->pag->getICFG())
79 {
80 if (it.second->getFun())
81 {
82 funs.insert(it.second->getFun());
83
84 if (
_ae->allAnalyzedNodes.find(it.second) !=
_ae->allAnalyzedNodes.end())
85 {
86 analyzedFuns.insert(it.second->getFun());
87 }
88 }
90 {
92 {
93 callSiteNum++;
94 }
95 else
96 {
97 extCallSiteNum++;
98 }
99 }
100 }
103
104
105 if (funs.size() > 0)
106 {
107 double funcCoveragePercent = (double)analyzedFuns.size() / (double)funs.size() * 100.0;
109 }
110 else
111 {
113 }
114
118}
std::string getMemUsage()
bool isExtCall(const FunObjVar *fun)
LLVM_NODISCARD std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > dyn_cast(const Y &Val)
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
◆ getBlockTrace()
| u32_t & SVF::AEStat::getBlockTrace |
( |
| ) |
|
|
inline |
◆ getFunctionTrace()
| u32_t & SVF::AEStat::getFunctionTrace |
( |
| ) |
|
|
inline |
◆ getICFGNodeTrace()
| u32_t & SVF::AEStat::getICFGNodeTrace |
( |
| ) |
|
|
inline |
◆ getMemUsage()
| std::string SVF::AEStat::getMemUsage |
( |
| ) |
|
|
inline |
Definition at line 46 of file AEStat.h.
47 {
50 }
bool getMemoryUsageKB(u32_t *vmrss_kb, u32_t *vmsize_kb)
Get memory usage from system file. Return TRUE if succeed.
◆ performStat()
| void AEStat::performStat |
( |
| ) |
|
|
overridevirtual |
Implements SVF::SVFStat.
Definition at line 120 of file AEStat.cpp.
121{
122 std::string fullName(
_ae->moduleName);
125 if (fullName.find('/') == std::string::npos)
126 {
127 std::string
name = fullName;
129 }
130 else
131 {
132 std::string
name = fullName.substr(fullName.find(
'/'), fullName.size());
134 }
135
139 unsigned field_width = 30;
141 {
142
143 if (it->first == "ICFG_Coverage_Percent" || it->first == "Func_Coverage_Percent")
144 {
145 double percent = (double)it->second / 100.0;
146 std::cout << std::setw(field_width) << it->first << std::fixed << std::setprecision(2) << percent << "%\n";
147 }
148 else
149 {
150 std::cout << std::setw(field_width) << it->first << it->second << "\n";
151 }
152 }
153 SVFUtil::outs() <<
"-------------------------------------------------------\n";
155 {
156
157 SVFUtil::outs() << std::setw(field_width) << it->first << it->second <<
"\n";
158 }
160
161 SVFUtil::outs() <<
"#######################################################" << std::endl;
163}
std::ostream & outs()
Overwrite llvm::outs().
◆ _ae
◆ count
| s32_t SVF::AEStat::count {0} |
◆ memory_usage
| std::string SVF::AEStat::memory_usage |
◆ memUsage
| std::string SVF::AEStat::memUsage |
The documentation for this class was generated from the following files:
- /home/runner/work/SVF/SVF/svf/include/AE/Svfexe/AEStat.h
- /home/runner/work/SVF/SVF/svf/lib/AE/Svfexe/AEStat.cpp