Static Value-Flow Analysis
PTAStat.h
Go to the documentation of this file.
1 //===- PTAStat.h -- Base class for statistics---------------------------------//
2 //
3 // SVF: Static Value-Flow Analysis
4 //
5 // Copyright (C) <2013-2017> <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 /*
24  * PTAStat.h
25  *
26  * Created on: Oct 12, 2013
27  * Author: Yulei Sui
28  */
29 
30 #ifndef ANDERSENSTAT_H_
31 #define ANDERSENSTAT_H_
32 
33 #include "SVFIR/SVFValue.h"
34 #include "MemoryModel/PointsTo.h"
35 #include "Util/SVFStat.h"
36 #include <iostream>
37 #include <map>
38 #include <string>
39 
40 namespace SVF
41 {
42 
43 class PointerAnalysis;
44 
48 class PTAStat: public SVFStat
49 {
50 public:
52  virtual ~PTAStat() {}
53 
55 
56  inline void setMemUsageBefore(u32_t vmrss, u32_t vmsize)
57  {
58  _vmrssUsageBefore = vmrss;
59  _vmsizeUsageBefore = vmsize;
60  }
61 
62  inline void setMemUsageAfter(u32_t vmrss, u32_t vmsize)
63  {
64  _vmrssUsageAfter = vmrss;
65  _vmsizeUsageAfter = vmsize;
66  }
67 
68  void performStat() override;
69 
70  void callgraphStat() override;
71 
72 
73 protected:
79 };
80 
81 } // End namespace SVF
82 
83 #endif /* ANDERSENSTAT_H_ */
cJSON * p
Definition: cJSON.cpp:2559
virtual ~PTAStat()
Definition: PTAStat.h:52
void setMemUsageBefore(u32_t vmrss, u32_t vmsize)
Definition: PTAStat.h:56
void setMemUsageAfter(u32_t vmrss, u32_t vmsize)
Definition: PTAStat.h:62
u32_t _vmsizeUsageBefore
Definition: PTAStat.h:77
NodeBS localVarInRecursion
Definition: PTAStat.h:54
PointerAnalysis * pta
Definition: PTAStat.h:74
u32_t _vmsizeUsageAfter
Definition: PTAStat.h:78
u32_t _vmrssUsageAfter
Definition: PTAStat.h:76
PTAStat(PointerAnalysis *p)
Definition: PTAStat.cpp:39
void performStat() override
Definition: PTAStat.cpp:52
u32_t _vmrssUsageBefore
Definition: PTAStat.h:75
void callgraphStat() override
Definition: PTAStat.cpp:81
for isBitcode
Definition: BasicTypes.h:68
unsigned u32_t
Definition: GeneralType.h:46