#include <nitro/os.h>
void OS_DumpStatistics( void* statBuf );
statBuf | Function cost statistics buffer |
None.
This function displays the contents of the function cost statistics buffer.
It uses OS_Printf()
to output the contents of the function cost statistics buffer in which the function cost calculation results are accumulated.
To enable this function, at link time you must include libos.FUNCTIONCOST.a
(in the thumb version libos.FUNCTIONCOST.thumb.a
). To do this, specify NITRO_PROFILE_TYPE=FUNCTIONCOST
as a make
option. You may also write it in the makefile
. However, in the final ROM version (FINALROM) library, it will not do anything.
(Display Example)---- functionCost statistics
test1: count 1, cost 20
test2: count 3, cost 140
test3: count 4, cost 132
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.test1()
was called once, and the time cost was 20. (The time cost unit is the same as for something that is used with ticks: 1/64 of the system clock.) Likewise,test2()
was called 3 times, and the total time cost was 140.test3()
was called 4 times and the total time cost was 132.
05/19/2004 Initial Version