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_DumpStatistics</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_DumpStatistics <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_DumpStatistics( void* statBuf );</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  </TBODY>
26</TABLE>
27<H2>Return Values</H2>
28<P>None.</P>
29<H2>Description</H2>
30<P>This function displays the contents of the function cost statistics buffer.</P>
31<P>It uses <CODE>OS_Printf()</CODE> to output the contents of the function cost statistics buffer in which the function cost calculation results are accumulated.</P>
32<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>
33<BLOCKQUOTE>(Display Example)
34<BLOCKQUOTE><CODE>---- functionCost statistics<BR></CODE><CODE>test1: count 1, cost 20<BR> test2: count 3, cost 140<BR> test3: count 4, cost 132<BR></CODE></BLOCKQUOTE>
35</BLOCKQUOTE>
36<BLOCKQUOTE>The accumulated results are displayed in a row from the left: function name, number of times the function has been called, time cost required to execute inside the function. From this we can see that a function named <CODE>test1()</CODE> was called once, and the time cost was 20. (The time cost unit is the same unit that is used with ticks: 1/64th of the system clock.) Likewise, <CODE>test2()</CODE> was called 3 times, and the total time cost was 140; <CODE>test3()</CODE> was called 4 times, and the total time cost was 132.</BLOCKQUOTE>
37<H2>See Also</H2>
38<P><CODE><A href="OS_InitStatistics.html">OS_InitStatistics</A><BR></CODE></P>
39<H2>Revision History</H2>
40<P>2004/05/19 Initial version.</P>
41<hr><p>CONFIDENTIAL</p></body>
42</HTML>