Static Value-Flow Analysis
Loading...
Searching...
No Matches
AEStat.h
Go to the documentation of this file.
1//===- AEStat.h -- Statistics for Abstract Execution----------//
2//
3// SVF: Static Value-Flow Analysis
4//
5// Copyright (C) <2013-> <Yulei Sui>
6//
7
8// This program is free software: you can redistribute it and/or modify
9// it under the terms of the GNU Affero General Public License as published by
10// the Free Software Foundation, either version 3 of the License, or
11// (at your option) any later version.
12
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU Affero General Public License for more details.
17
18// You should have received a copy of the GNU Affero General Public License
19// along with this program. If not, see <http://www.gnu.org/licenses/>.
20//
21//===----------------------------------------------------------------------===//
22
23#pragma once
24#include "SVFIR/SVFType.h"
25#include "Util/SVFUtil.h"
26#include "Util/SVFStat.h"
27#include <string>
28
29namespace SVF
30{
31
32class AbstractInterpretation;
33
35class AEStat : public SVFStat
36{
37public:
38 void countStateSize();
44 {
45 }
46 inline std::string getMemUsage()
47 {
49 return SVFUtil::getMemoryUsageKB(&vmrss, &vmsize) ? std::to_string(vmsize) + "KB" : "cannot read memory usage";
50 }
51
52 void finializeStat();
53 void performStat() override;
54
55public:
58 std::string memory_usage;
59 std::string memUsage;
60
61
63 {
64 if (generalNumMap.count("Function_Trace") == 0)
65 {
66 generalNumMap["Function_Trace"] = 0;
67 }
68 return generalNumMap["Function_Trace"];
69 }
71 {
72 if (generalNumMap.count("Block_Trace") == 0)
73 {
74 generalNumMap["Block_Trace"] = 0;
75 }
76 return generalNumMap["Block_Trace"];
77 }
79 {
80 if (generalNumMap.count("ICFG_Node_Trace") == 0)
81 {
82 generalNumMap["ICFG_Node_Trace"] = 0;
83 }
84 return generalNumMap["ICFG_Node_Trace"];
85 }
86};
87
88} // namespace SVF
AEStat: Statistic for AE.
Definition AEStat.h:36
s32_t count
Definition AEStat.h:57
std::string memory_usage
Definition AEStat.h:58
std::string memUsage
Definition AEStat.h:59
u32_t & getFunctionTrace()
Definition AEStat.h:62
void finializeStat()
Definition AEStat.cpp:43
u32_t & getBlockTrace()
Definition AEStat.h:70
void performStat() override
Definition AEStat.cpp:120
u32_t & getICFGNodeTrace()
Definition AEStat.h:78
AEStat(AbstractInterpretation *ae)
Definition AEStat.h:39
std::string getMemUsage()
Definition AEStat.h:46
void countStateSize()
Definition AEStat.cpp:31
AbstractInterpretation * _ae
Definition AEStat.h:56
AbstractInterpretation is same as Abstract Execution.
NUMStatMap generalNumMap
Definition SVFStat.h:76
double startTime
Definition SVFStat.h:80
static double getClk(bool mark=false)
Definition SVFStat.cpp:48
bool getMemoryUsageKB(u32_t *vmrss_kb, u32_t *vmsize_kb)
Get memory usage from system file. Return TRUE if succeed.
Definition SVFUtil.cpp:179
for isBitcode
Definition BasicTypes.h:68
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74
signed s32_t
Definition GeneralType.h:48
unsigned u32_t
Definition GeneralType.h:47