summaryrefslogtreecommitdiff
path: root/profile_8h.html
blob: 4ac8dda4b7dbefb0d6c3fb48a1367ef04f55001d (plain)
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>navit: profile.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">navit
   &#160;<span id="projectnumber">0.5.3-trunk</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('profile_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">profile.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="profile_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ae7d0205eae61719c157056eda01d9bf7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="profile_8h.html#ae7d0205eae61719c157056eda01d9bf7">profile_str2</a>(x)&#160;&#160;&#160;#x</td></tr>
<tr class="separator:ae7d0205eae61719c157056eda01d9bf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ca09e02025f492aae2019ffccabb0b6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="profile_8h.html#a5ca09e02025f492aae2019ffccabb0b6">profile_str1</a>(x)&#160;&#160;&#160;<a class="el" href="profile_8h.html#ae7d0205eae61719c157056eda01d9bf7">profile_str2</a>(x)</td></tr>
<tr class="separator:a5ca09e02025f492aae2019ffccabb0b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51a854e236ea7856b8ffcf8b20a7d7cc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="profile_8h.html#a51a854e236ea7856b8ffcf8b20a7d7cc">profile_module</a>&#160;&#160;&#160;<a class="el" href="profile_8h.html#a5ca09e02025f492aae2019ffccabb0b6">profile_str1</a>(MODULE)</td></tr>
<tr class="separator:a51a854e236ea7856b8ffcf8b20a7d7cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7135a9f7aaa8602a6e2cc1d9ab3c1573"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="profile_8h.html#a7135a9f7aaa8602a6e2cc1d9ab3c1573">profile</a>(<a class="el" href="structlevel.html">level</a>, ...)&#160;&#160;&#160;<a class="el" href="profile_8h.html#aa76650cead3782aa2905f4a573598d6a">profile_timer</a>(<a class="el" href="structlevel.html">level</a>,<a class="el" href="profile_8h.html#a51a854e236ea7856b8ffcf8b20a7d7cc">profile_module</a>,__PRETTY_FUNCTION__,__VA_ARGS__)</td></tr>
<tr class="separator:a7135a9f7aaa8602a6e2cc1d9ab3c1573"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa76650cead3782aa2905f4a573598d6a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="profile_8h.html#aa76650cead3782aa2905f4a573598d6a">profile_timer</a> (int <a class="el" href="structlevel.html">level</a>, const char *module, const char *function, const char *fmt,...)</td></tr>
<tr class="memdesc:aa76650cead3782aa2905f4a573598d6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log timing information.  <a href="profile_8h.html#aa76650cead3782aa2905f4a573598d6a">More...</a><br /></td></tr>
<tr class="separator:aa76650cead3782aa2905f4a573598d6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a7135a9f7aaa8602a6e2cc1d9ab3c1573"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7135a9f7aaa8602a6e2cc1d9ab3c1573">&#9670;&nbsp;</a></span>profile</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define profile</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="structlevel.html">level</a>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="profile_8h.html#aa76650cead3782aa2905f4a573598d6a">profile_timer</a>(<a class="el" href="structlevel.html">level</a>,<a class="el" href="profile_8h.html#a51a854e236ea7856b8ffcf8b20a7d7cc">profile_module</a>,__PRETTY_FUNCTION__,__VA_ARGS__)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a51a854e236ea7856b8ffcf8b20a7d7cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51a854e236ea7856b8ffcf8b20a7d7cc">&#9670;&nbsp;</a></span>profile_module</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define profile_module&#160;&#160;&#160;<a class="el" href="profile_8h.html#a5ca09e02025f492aae2019ffccabb0b6">profile_str1</a>(MODULE)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a5ca09e02025f492aae2019ffccabb0b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ca09e02025f492aae2019ffccabb0b6">&#9670;&nbsp;</a></span>profile_str1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define profile_str1</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="profile_8h.html#ae7d0205eae61719c157056eda01d9bf7">profile_str2</a>(x)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae7d0205eae61719c157056eda01d9bf7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7d0205eae61719c157056eda01d9bf7">&#9670;&nbsp;</a></span>profile_str2</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define profile_str2</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x</td><td>)</td>
          <td>&#160;&#160;&#160;#x</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team</p>
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation.</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.</p>
<p>You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="aa76650cead3782aa2905f4a573598d6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa76650cead3782aa2905f4a573598d6a">&#9670;&nbsp;</a></span>profile_timer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void profile_timer </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>module</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>function</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Log timing information. </p>
<dl class="section note"><dt>Note</dt><dd>Normally this function is called via the macro 'profile', which automatically fills in parameters 'module' and 'function'.</dd></dl>
<p>Successive calls to this function will print the elapsed time between calls, using an internal timer. To start/reset the internal timer without printing a message, set parameter 'fmt' to NULL.</p>
<p>To run multiple timers in parallel, the parameter 'level' can be used. Each invocation will print the elapsed time to the last invocation with the same level. As an exception, calling with 'fmt'=NULL wll reset all timers with a level greater or equal to the level parameter.</p>
<p>Typically, profiling is started by calling <a class="el" href="profile_8h.html#a7135a9f7aaa8602a6e2cc1d9ab3c1573">profile(0, NULL)</a>. Then calls with various levels can be used to print different intermediate timings.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">level</td><td>level of timer to use (0 to PROFILE_LEVEL_MAX). </td></tr>
    <tr><td class="paramname">module</td><td>name of current module (for logging) </td></tr>
    <tr><td class="paramname">function</td><td>name of current function (for logging) </td></tr>
    <tr><td class="paramname">fmt</td><td>format string Log message to print (as a printf format string), followed by required parameters as varargs. May be NULL; then no message is printed, and all timers with the same or higher level are reset. </td></tr>
  </table>
  </dd>
</dl>

<p class="reference">References <a class="el" href="debug_8c.html#a0216fe3aae211a3db82a5f53d20d62a1">debug_printf()</a>, <a class="el" href="debug_8c.html#a571b0687631593ccf85d2205e06229a1">debug_vprintf()</a>, <a class="el" href="debug_8h.html#a3ce13c42b29fe2a7552478859b7f3c25aa4a22485b46e3407434f1093e42867d4">lvl_debug</a>, and <a class="el" href="profile_8c.html#afa3d4c231a1b238d81d2966b340db5b3">PROFILE_LEVEL_MAX</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="profile_8h.html">profile.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>