1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>OilProfile</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
7 <link rel="home" href="index.html" title="Liboil Reference Manual">
8 <link rel="up" href="ch02.html" title="Liboil Unstable API">
9 <link rel="prev" href="liboil-liboilparameter.html" title="OilParameter">
10 <link rel="next" href="liboil-liboilprototype.html" title="OilPrototype">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="ch01.html" title="Liboil Stable API">
14 <link rel="chapter" href="ch02.html" title="Liboil Unstable API">
16 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
17 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
19 <td><a accesskey="p" href="liboil-liboilparameter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
20 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
22 <th width="100%" align="center">Liboil Reference Manual</th>
23 <td><a accesskey="n" href="liboil-liboilprototype.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
25 <tr><td colspan="5" class="shortcuts">
26 <a href="#liboil-liboilprofile.synopsis" class="shortcut">Top</a>
28 <a href="#liboil-liboilprofile.description" class="shortcut">Description</a>
31 <div class="refentry" title="OilProfile">
32 <a name="liboil-liboilprofile"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
35 <h2><span class="refentrytitle"><a name="liboil-liboilprofile.top_of_page"></a>OilProfile</span></h2>
36 <p>OilProfile — Measuring the length of time needed to execute Liboil functions.</p>
38 <td valign="top" align="right"></td>
40 <div class="refsynopsisdiv" title="Synopsis">
41 <a name="liboil-liboilprofile.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">
43 <a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a>;
44 #define <a class="link" href="liboil-liboilprofile.html#OIL-PROFILE-HIST-LENGTH--CAPS" title="OIL_PROFILE_HIST_LENGTH">OIL_PROFILE_HIST_LENGTH</a>
45 unsigned long <a class="link" href="liboil-liboilprofile.html#oil-profile-stamp" title="oil_profile_stamp ()">oil_profile_stamp</a> (void);
46 void <a class="link" href="liboil-liboilprofile.html#oil-profile-init" title="oil_profile_init ()">oil_profile_init</a> (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof);
47 void <a class="link" href="liboil-liboilprofile.html#oil-profile-stop-handle" title="oil_profile_stop_handle ()">oil_profile_stop_handle</a> (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof);
48 void <a class="link" href="liboil-liboilprofile.html#oil-profile-get-ave-std" title="oil_profile_get_ave_std ()">oil_profile_get_ave_std</a> (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof,
51 #define <a class="link" href="liboil-liboilprofile.html#oil-profile-start" title="oil_profile_start()">oil_profile_start</a> (x)
52 #define <a class="link" href="liboil-liboilprofile.html#oil-profile-stop" title="oil_profile_stop()">oil_profile_stop</a> (x)
55 <div class="refsect1" title="Description">
56 <a name="liboil-liboilprofile.description"></a><h2>Description</h2>
62 <div class="refsect1" title="Details">
63 <a name="liboil-liboilprofile.details"></a><h2>Details</h2>
64 <div class="refsect2" title="OilProfile">
65 <a name="OilProfile"></a><h3>OilProfile</h3>
66 <pre class="programlisting">typedef struct {
70 An opaque structure representing profiling information.</p>
75 <div class="refsect2" title="OIL_PROFILE_HIST_LENGTH">
76 <a name="OIL-PROFILE-HIST-LENGTH--CAPS"></a><h3>OIL_PROFILE_HIST_LENGTH</h3>
77 <pre class="programlisting">#define OIL_PROFILE_HIST_LENGTH 10
80 Internal definition of the number of histogram entries in <a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile"><span class="type">OilProfile</span></a>.</p>
85 <div class="refsect2" title="oil_profile_stamp ()">
86 <a name="oil-profile-stamp"></a><h3>oil_profile_stamp ()</h3>
87 <pre class="programlisting">unsigned long oil_profile_stamp (void);</pre>
89 Creates a timestamp based on a CPU-specific high-frequency
90 counter, if available.</p>
93 <div class="variablelist"><table border="0">
94 <col align="left" valign="top">
96 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
103 <div class="refsect2" title="oil_profile_init ()">
104 <a name="oil-profile-init"></a><h3>oil_profile_init ()</h3>
105 <pre class="programlisting">void oil_profile_init (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof);</pre>
107 Initializes a profiling structure.</p>
110 <div class="variablelist"><table border="0">
111 <col align="left" valign="top">
113 <td><p><span class="term"><em class="parameter"><code>prof</code></em> :</span></p></td>
114 <td> the OilProfile structure
120 <div class="refsect2" title="oil_profile_stop_handle ()">
121 <a name="oil-profile-stop-handle"></a><h3>oil_profile_stop_handle ()</h3>
122 <pre class="programlisting">void oil_profile_stop_handle (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof);</pre>
124 Handles post-processing of a single profiling run.
127 FIXME: need more info</p>
130 <div class="variablelist"><table border="0">
131 <col align="left" valign="top">
133 <td><p><span class="term"><em class="parameter"><code>prof</code></em> :</span></p></td>
134 <td> the OilProfile structure
140 <div class="refsect2" title="oil_profile_get_ave_std ()">
141 <a name="oil-profile-get-ave-std"></a><h3>oil_profile_get_ave_std ()</h3>
142 <pre class="programlisting">void oil_profile_get_ave_std (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof,
144 double *std_p);</pre>
146 Calculates the average and standard deviation of a number of
147 profiling runs, and places the results in the locations
148 provided by <em class="parameter"><code>ave_p</code></em> and <em class="parameter"><code>std_p</code></em>. Either <em class="parameter"><code>ave_p</code></em> and <em class="parameter"><code>std_p</code></em> may
149 be NULL, in which case the values will not be written.</p>
152 <div class="variablelist"><table border="0">
153 <col align="left" valign="top">
156 <td><p><span class="term"><em class="parameter"><code>prof</code></em> :</span></p></td>
157 <td> the OilProfile structure
161 <td><p><span class="term"><em class="parameter"><code>ave_p</code></em> :</span></p></td>
162 <td> pointer to average
166 <td><p><span class="term"><em class="parameter"><code>std_p</code></em> :</span></p></td>
167 <td> pointer to standard deviation
174 <div class="refsect2" title="oil_profile_start()">
175 <a name="oil-profile-start"></a><h3>oil_profile_start()</h3>
176 <pre class="programlisting">#define oil_profile_start(x)</pre>
178 Starts a profiling run by obtaining a timestamp via <a class="link" href="liboil-liboilprofile.html#oil-profile-stamp" title="oil_profile_stamp ()"><code class="function">oil_profile_stamp()</code></a>
179 and writing it into <em class="parameter"><code>x</code></em>.</p>
182 <div class="variablelist"><table border="0">
183 <col align="left" valign="top">
185 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
186 <td> a pointer to an OilProfile structure
192 <div class="refsect2" title="oil_profile_stop()">
193 <a name="oil-profile-stop"></a><h3>oil_profile_stop()</h3>
194 <pre class="programlisting">#define oil_profile_stop(x)</pre>
196 Stops a profiling run by obtaining a timestamp via <a class="link" href="liboil-liboilprofile.html#oil-profile-stamp" title="oil_profile_stamp ()"><code class="function">oil_profile_stamp()</code></a>
197 and writing it into <em class="parameter"><code>x</code></em>. It then calls <a class="link" href="liboil-liboilprofile.html#oil-profile-stop-handle" title="oil_profile_stop_handle ()"><code class="function">oil_profile_stop_handle()</code></a> to
198 handle post-processing of the profiling run.</p>
201 <div class="variablelist"><table border="0">
202 <col align="left" valign="top">
204 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
205 <td> a pointer to an OilProfile structure
214 Generated by GTK-Doc V1.11</div>