aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/dtracetoolkit/Examples/py_calltime_example.txt
blob: bda8ea898826d9eba5db77694e42f598c1241163 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
The following are examples of py_calltime.d.

This script traces the elapsed time of Python functions and prints a report. 
Here it traces the example program, Code/Python/func_abc.py

# py_calltime.d
Tracing... Hit Ctrl-C to end.
^C

Count,
   FILE                 TYPE       NAME                                COUNT
   UserDict.py          func       ?                                       1
   UserDict.py          func       DictMixin                               1
   UserDict.py          func       IterableUserDict                        1
   UserDict.py          func       UserDict                                1
   UserDict.py          func       __init__                                1
   __init__.py          func       ?                                       1
   __init__.py          func       CodecRegistryError                      1
   __init__.py          func       normalize_encoding                      1
   __init__.py          func       search_function                         1
   aliases.py           func       ?                                       1
   ascii.py             func       ?                                       1
   ascii.py             func       Codec                                   1
   ascii.py             func       StreamConverter                         1
   ascii.py             func       StreamReader                            1
   ascii.py             func       StreamWriter                            1
   ascii.py             func       getregentry                             1
   codecs.py            func       ?                                       1
   codecs.py            func       Codec                                   1
   codecs.py            func       StreamReader                            1
   codecs.py            func       StreamReaderWriter                      1
   codecs.py            func       StreamRecoder                           1
   codecs.py            func       StreamWriter                            1
   copy_reg.py          func       ?                                       1
   func_abc.py          func       ?                                       1
   func_abc.py          func       func_a                                  1
   func_abc.py          func       func_b                                  1
   func_abc.py          func       func_c                                  1
   linecache.py         func       ?                                       1
   os.py                func       ?                                       1
   os.py                func       _Environ                                1
   os.py                func       __init__                                1
   os.py                func       _get_exports_list                       1
   posixpath.py         func       ?                                       1
   posixpath.py         func       basename                                1
   posixpath.py         func       dirname                                 1
   site.py              func       ?                                       1
   site.py              func       _Helper                                 1
   site.py              func       _Printer                                1
   site.py              func       _init_pathinfo                          1
   site.py              func       abs__file__                             1
   site.py              func       addsitepackages                         1
   site.py              func       aliasmbcs                               1
   site.py              func       execsitecustomize                       1
   site.py              func       main                                    1
   site.py              func       removeduppaths                          1
   site.py              func       setcopyright                            1
   site.py              func       setencoding                             1
   site.py              func       sethelper                               1
   site.py              func       setquit                                 1
   stat.py              func       ?                                       1
   types.py             func       ?                                       1
   types.py             func       _C                                      1
   warnings.py          func       ?                                       1
   warnings.py          func       _OptionError                            1
   warnings.py          func       _processoptions                         1
   posixpath.py         func       exists                                  2
   posixpath.py         func       split                                   2
   site.py              func       addsitedir                              2
   warnings.py          func       simplefilter                            2
   copy_reg.py          func       constructor                             3
   copy_reg.py          func       pickle                                  3
   site.py              func       __init__                                3
   site.py              func       addpackage                              3
   stat.py              func       S_IFMT                                  6
   stat.py              func       S_ISDIR                                 6
   posixpath.py         func       isdir                                   8
   os.py                func       _exists                                10
   <string>             func       ?                                      11
   posixpath.py         func       normcase                               14
   site.py              func       makepath                               14
   posixpath.py         func       join                                   20
   posixpath.py         func       abspath                                22
   posixpath.py         func       isabs                                  22
   posixpath.py         func       normpath                               22
   -                    total      -                                     230

Exclusive function elapsed times (us),
   FILE                 TYPE       NAME                                TOTAL
   ascii.py             func       StreamWriter                            2
   ascii.py             func       StreamReader                            2
   site.py              func       setencoding                             2
   UserDict.py          func       IterableUserDict                        2
   __init__.py          func       CodecRegistryError                      2
   ascii.py             func       getregentry                             2
   site.py              func       aliasmbcs                               2
   warnings.py          func       _OptionError                            3
   types.py             func       _C                                      3
   site.py              func       sethelper                               3
   warnings.py          func       _processoptions                         3
   ascii.py             func       StreamConverter                         3
   ascii.py             func       Codec                                   3
   site.py              func       _Helper                                 3
   site.py              func       setquit                                 4
   codecs.py            func       StreamWriter                            4
   UserDict.py          func       __init__                                4
   site.py              func       _Printer                                4
   codecs.py            func       Codec                                   4
   os.py                func       _Environ                                4
   codecs.py            func       StreamRecoder                           5
   codecs.py            func       StreamReaderWriter                      6
   codecs.py            func       StreamReader                            6
   copy_reg.py          func       constructor                             7
   __init__.py          func       normalize_encoding                      9
   site.py              func       __init__                               10
   warnings.py          func       simplefilter                           11
   linecache.py         func       ?                                      11
   posixpath.py         func       split                                  13
   stat.py              func       ?                                      14
   stat.py              func       S_IFMT                                 14
   posixpath.py         func       dirname                                16
   posixpath.py         func       basename                               24
   os.py                func       __init__                               26
   posixpath.py         func       normcase                               29
   UserDict.py          func       UserDict                               32
   posixpath.py         func       exists                                 37
   aliases.py           func       ?                                      46
   <string>             func       ?                                      56
   copy_reg.py          func       pickle                                 59
   UserDict.py          func       ?                                      84
   site.py              func       addsitepackages                        85
   posixpath.py         func       isabs                                  87
   site.py              func       setcopyright                           94
   stat.py              func       S_ISDIR                                98
   posixpath.py         func       join                                  105
   types.py             func       ?                                     106
   site.py              func       removeduppaths                        115
   ascii.py             func       ?                                     122
   os.py                func       _get_exports_list                     136
   site.py              func       _init_pathinfo                        155
   site.py              func       abs__file__                           158
   codecs.py            func       ?                                     182
   UserDict.py          func       DictMixin                             184
   __init__.py          func       search_function                       205
   site.py              func       main                                  218
   posixpath.py         func       normpath                              231
   copy_reg.py          func       ?                                     239
   posixpath.py         func       isdir                                 285
   site.py              func       addpackage                            419
   site.py              func       addsitedir                            473
   warnings.py          func       ?                                     500
   posixpath.py         func       ?                                     546
   site.py              func       execsitecustomize                     558
   site.py              func       makepath                              608
   posixpath.py         func       abspath                               646
   os.py                func       _exists                               925
   __init__.py          func       ?                                    1289
   os.py                func       ?                                    1473
   site.py              func       ?                                    1510
   func_abc.py          func       ?                                    1517
   func_abc.py          func       func_c                            1000071
   func_abc.py          func       func_a                            1005706
   func_abc.py          func       func_b                            1010158
   -                    total      -                                 3029815

Inclusive function elapsed times (us),
   FILE                 TYPE       NAME                                TOTAL
   ascii.py             func       StreamWriter                            2
   ascii.py             func       StreamReader                            2
   site.py              func       setencoding                             2
   UserDict.py          func       IterableUserDict                        2
   __init__.py          func       CodecRegistryError                      2
   ascii.py             func       getregentry                             2
   site.py              func       aliasmbcs                               2
   warnings.py          func       _OptionError                            3
   types.py             func       _C                                      3
   site.py              func       sethelper                               3
   warnings.py          func       _processoptions                         3
   ascii.py             func       StreamConverter                         3
   ascii.py             func       Codec                                   3
   site.py              func       _Helper                                 3
   site.py              func       setquit                                 4
   codecs.py            func       StreamWriter                            4
   UserDict.py          func       __init__                                4
   site.py              func       _Printer                                4
   codecs.py            func       Codec                                   4
   os.py                func       _Environ                                4
   codecs.py            func       StreamRecoder                           5
   codecs.py            func       StreamReaderWriter                      6
   codecs.py            func       StreamReader                            6
   copy_reg.py          func       constructor                             7
   __init__.py          func       normalize_encoding                      9
   site.py              func       __init__                               10
   warnings.py          func       simplefilter                           11
   linecache.py         func       ?                                      11
   posixpath.py         func       split                                  13
   stat.py              func       ?                                      14
   stat.py              func       S_IFMT                                 14
   posixpath.py         func       dirname                                22
   posixpath.py         func       normcase                               29
   os.py                func       __init__                               31
   posixpath.py         func       basename                               31
   UserDict.py          func       UserDict                               32
   posixpath.py         func       exists                                 37
   aliases.py           func       ?                                      46
   copy_reg.py          func       pickle                                 66
   posixpath.py         func       isabs                                  87
   posixpath.py         func       join                                  105
   types.py             func       ?                                     109
   stat.py              func       S_ISDIR                               113
   site.py              func       setcopyright                          132
   ascii.py             func       ?                                     133
   os.py                func       _get_exports_list                     136
   UserDict.py          func       DictMixin                             184
   codecs.py            func       ?                                     210
   posixpath.py         func       normpath                              231
   UserDict.py          func       ?                                     303
   __init__.py          func       search_function                       350
   copy_reg.py          func       ?                                     377
   posixpath.py         func       isdir                                 399
   warnings.py          func       ?                                     530
   site.py              func       abs__file__                           540
   site.py              func       execsitecustomize                     558
   posixpath.py         func       ?                                     560
   site.py              func       removeduppaths                        565
   site.py              func       _init_pathinfo                        899
   os.py                func       _exists                               953
   posixpath.py         func       abspath                               966
   site.py              func       makepath                             1296
   __init__.py          func       ?                                    1548
   <string>             func       ?                                    1808
   site.py              func       addsitepackages                      2471
   site.py              func       addpackage                           2475
   os.py                func       ?                                    3879
   site.py              func       addsitedir                           4026
   site.py              func       main                                 4532
   site.py              func       ?                                    9930
   func_abc.py          func       func_c                            1000071
   func_abc.py          func       func_b                            2010230
   func_abc.py          func       func_a                            3015936
   func_abc.py          func       ?                                 3017454

Counts shows us how many times each different function was called, and how
many functions were called in total.

The exclusive function elapsed times show the time that each function spent 
processing code - while not in other functions.

The inclusive function elapsed times show the time that each function spent
processing code, including the time spent in other calls.

These elapsed times are the absolute time from when the function began to
when it completed - which includes off-CPU time due to other system events
such as I/O, scheduling, interrupts, etc.