ATLAS Offline Software
Loading...
Searching...
No Matches
dso-stats.Data Class Reference
Collaboration diagram for dso-stats.Data:

Public Member Functions

 __init__ (self, secs=None, name=None)
 __iadd__ (self, other)
 est_frag (self)
 total (self)
 add_secs (self, secs)
 dump (self, f)

Public Attributes

 name = name
int dso = 0
int code = 0
int puredata = 0
int cpp = 0
int java = 0
int initdata = 0
int bss = 0
int tbss = 0
int frag = 0
int ro = 0
int rw = 0

Detailed Description

Definition at line 68 of file dso-stats.py.

Constructor & Destructor Documentation

◆ __init__()

dso-stats.Data.__init__ ( self,
secs = None,
name = None )

Definition at line 69 of file dso-stats.py.

69 def __init__ (self, secs = None, name = None):
70 self.name = name
71 self.dso = 0
72 self.code = 0
73 self.puredata = 0
74 self.cpp = 0
75 self.java = 0
76 self.initdata = 0
77 self.bss = 0
78 self.tbss = 0
79 self.frag = 0
80
81 self.ro = 0
82 self.rw = 0
83
84 if secs:
85 self.add_secs (secs)
86 self.est_frag()
87 return
88
89

Member Function Documentation

◆ __iadd__()

dso-stats.Data.__iadd__ ( self,
other )

Definition at line 90 of file dso-stats.py.

90 def __iadd__ (self, other):
91 self.dso += other.dso
92 self.code += other.code
93 self.puredata += other.puredata
94 self.cpp += other.cpp
95 self.java += other.java
96 self.initdata += other.initdata
97 self.bss += other.bss
98 self.tbss += other.tbss
99 self.ro += other.ro
100 self.rw += other.rw
101 self.frag += other.frag
102 return self
103
104

◆ add_secs()

dso-stats.Data.add_secs ( self,
secs )

Definition at line 118 of file dso-stats.py.

118 def add_secs (self, secs):
119 for s, sz in secs:
120 if s in ['.hash', '.dynsym', '.dynstr', '.gnu.version',
121 '.gnu.version_r', '.rel.dyn', '.rel.plt',
122 '.init', '.plt', '.fini', '.init_array', '.fini_array',
123 '.gnu.hash', '.rela.dyn', '.rela.plt',
124 '.data.rel.ro']:
125 self.dso += sz
126 self.ro += sz
127
128 elif s in ['.text']:
129 self.code += sz
130 self.ro += sz
131
132 elif s in ['.rodata']:
133 self.puredata += sz
134 self.ro += sz
135
136 elif s in ['.eh_frame_hdr', '.eh_frame', '.gcc_except_table']:
137 self.cpp += sz
138 self.ro += sz
139
140 elif s in ['.ctors', '.dtors']:
141 self.cpp += sz
142 self.rw += sz
143
144
145 elif s in ['.jcr']:
146 self.java += sz
147 self.rw += sz
148
149 elif s in ['.dynamic', '.got', '.got.plt', '.plt.got']:
150 self.dso += sz
151 self.rw += sz
152
153 elif s in ['.data']:
154 self.initdata += sz
155 self.rw += sz
156
157 elif s in ['.bss']:
158 self.bss += sz
159
160 elif s in ['.tbss']:
161 self.tbss += sz
162
163 elif s in ['.comment', '.gnu_debuglink'] or s.startswith ('.debug'):
164 pass
165
166 else:
167 print ('** Unknown section [%s] **' % s, file=sys.stderr)
168
169 return
170
171
172

◆ dump()

dso-stats.Data.dump ( self,
f )

Definition at line 173 of file dso-stats.py.

173 def dump (self, f):
174 kw = {}
175 kw['name'] = _cleanname (self.name)
176 kw['dso'] = _form (self.dso)
177 kw['code'] = _form (self.code)
178 kw['puredata'] = _form (self.puredata)
179 kw['cpp'] = _form (self.cpp)
180 kw['java'] = _form (self.java)
181 kw['initdata'] = _form (self.initdata)
182 kw['frag'] = _form (self.frag)
183 kw['bss'] = _form (self.bss)
184 kw['tbss'] = _form (self.tbss)
185 kw['total'] = _form (self.total())
186 print (format % kw, file=f)
187
-event-from-file

◆ est_frag()

dso-stats.Data.est_frag ( self)

Definition at line 105 of file dso-stats.py.

105 def est_frag (self):
106 self.frag += _frag (self.ro)
107 self.frag += _frag (self.rw)
108 self.frag += _frag (self.bss)
109 self.frag += _frag (self.tbss)
110 return
111
112

◆ total()

dso-stats.Data.total ( self)

Definition at line 113 of file dso-stats.py.

113 def total (self):
114 return (self.dso + self.code + self.puredata + self.cpp +
115 self.java + self.initdata + self.frag + self.bss + self.tbss)
116
117

Member Data Documentation

◆ bss

int dso-stats.Data.bss = 0

Definition at line 77 of file dso-stats.py.

◆ code

int dso-stats.Data.code = 0

Definition at line 72 of file dso-stats.py.

◆ cpp

int dso-stats.Data.cpp = 0

Definition at line 74 of file dso-stats.py.

◆ dso

int dso-stats.Data.dso = 0

Definition at line 71 of file dso-stats.py.

◆ frag

int dso-stats.Data.frag = 0

Definition at line 79 of file dso-stats.py.

◆ initdata

int dso-stats.Data.initdata = 0

Definition at line 76 of file dso-stats.py.

◆ java

int dso-stats.Data.java = 0

Definition at line 75 of file dso-stats.py.

◆ name

dso-stats.Data.name = name

Definition at line 70 of file dso-stats.py.

◆ puredata

int dso-stats.Data.puredata = 0

Definition at line 73 of file dso-stats.py.

◆ ro

int dso-stats.Data.ro = 0

Definition at line 81 of file dso-stats.py.

◆ rw

int dso-stats.Data.rw = 0

Definition at line 82 of file dso-stats.py.

◆ tbss

dso-stats.Data.tbss = 0

Definition at line 78 of file dso-stats.py.


The documentation for this class was generated from the following file: