1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>OS_InitStatistics</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_InitStatistics <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD><CODE>#include &lt;nitro/os.h&gt;</CODE><BR>
15  <BR>
16  <CODE>void OS_InitStatistics( void* statBuf, u32 size );</CODE>
17</DL>
18<H2>Arguments</H2>
19<TABLE border="1">
20  <TBODY>
21    <TR>
22      <TD><I><B>statBuf</B></I></TD>
23      <TD>Function cost statistics buffer</TD>
24    </TR>
25    <TR>
26      <TD><I><B>size</B></I></TD>
27      <TD>Size of the function cost statistics buffer</TD>
28    </TR>
29  </TBODY>
30</TABLE>
31<H2>Return Values</H2>
32<P>None.</P>
33<H2>Description</H2>
34<P>This function initializes the function cost statistics buffer.</P>
35<P>To enable this function, at link time you must include <CODE>libos.FUNCTIONCOST.a</CODE> (in the thumb version <CODE>libos.FUNCTIONCOST.thumb.a</CODE>). To do this, specify <CODE>TWL_PROFILE_TYPE=FUNCTIONCOST</CODE> as a <CODE>make</CODE> option. You may also write it in the <CODE>makefile</CODE>. However, in the final ROM version (FINALROM) library, it will not do anything.</P>
36<P>Header information ( <CODE>sizeof(OSFunctionCostStatisticsInfo) - sizeof(OSFunctionCostStatistics)</CODE> bytes, which includes the buffer's end position, the current pointer, and so on) is stored in the front of the buffer <B><I>buf</I></B>. The rest of the buffer is packed from the front with the statistics information.</P>
37<P>Use <CODE><A href="OS_CalcStatistics.html">OS_CalcStatistics()</A></CODE> or <CODE><A href="OS_CalcThreadStatistics.html">OS_CalcThreadStatistics()</A></CODE> to aggregate the contents of a function cost calculation buffer into the function cost statistics buffer. Then use <CODE><A href="OS_DumpStatistics.html">OS_DumpStatistics()</A></CODE> to display those contents. You can accumulate the contents of multiple function cost calculation buffers into one function cost statistics buffer.</P>
38<H2>See Also</H2>
39<P><CODE><A href="OS_DumpStatistics.html">OS_DumpStatistics</A>, <A href="OS_CalcStatistics.html">OS_CalcStatistics</A>, <A href="OS_CalcThreadStatistics.html">OS_CalcThreadStatistics</A><BR></CODE></P>
40<H2>Revision History</H2>
41<P>2004/05/18 Initial version.</P>
42<hr><p>CONFIDENTIAL</p></body>
43</HTML>