This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Performance timing


C B wrote:
> 
>   I'm interested in collecting some performance measures on some of my own functions.  Are there some simple utilities or example for doing this or is looking at tm_basic.cxx the best bet?

It depends on the scope of what you want to measure.  The
techniques used by tm_basic are good for small things - those
that execute in less than a system tick (typically 10ms), but
using them requires some invasive changes (you have to explicitly
capture start and stop times for a function/segment, etc).

Alternatively, you can turn on system profiling.  All this
requires is a [fairly] high resolution timer and some RAM.
There is no need to modify your code directly.  The data
is gathered into a RAM buffer and then offloaded (the only
method for this currently uses the network and TFTP).  Once
you have the data off the box, it can be analyzed using
standard tools, such as 'gprof'

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]