Hans-Peter Reichert
|
Re: Accuracy of application profiler
|
Hans-Peter Reichert
08/02/2010 12:38 PM
post61350
|
Re: Accuracy of application profiler
> I have built the executable for ARM cortex A8 NEON processor and profiling the
> code using the momentics ICE 6.4.1 and the target board.
>
> 1. Whether the profiling is accurate ?
> 2. Does the profiling also includes the context switching time while executing
> any process ?
> 3. How to get accurate time (i.e. only time taken taken to run each function
> excluding system overheads and context switching time etc) for any function ?
from within Momentics build options there are two different types of profiling available.
-classical gnu gprof style profiling
-function instrumentation profiling
to get detailed information you have to use the "function insturmentation" option.
to be abale to do threaded accounting you have to work together with kernel tracing.
normal logging in shared mem file does not provide the information about scheduling.
in other words: if you have one instrumented thread, the numbers will not be accurate according to other threads
runnings
t1: P1.T1(instr) -> foo() enter
t2: scheduler
t3: Px.Tx -> running for x time
t4: scheduler
t5: P1.T1(instr) -> foo() exit
accounting will give you t5 - t1 as execution time for foo() and you do not see the scheduling.
about accuracy: be aware of Heisenberg, using function insturmentation and kernel tarcing you'll get a high system
impact so that you should only look at the % numbers (and there was some stuff with inlines not being inlined any more).
have you allready checked this:
http://www.qnx.com/developers/docs/6.4.1/ide_en/user_guide/profiler.html
HTH
/hp
|
|
|
Elena Laskavaia
|
Re: Accuracy of application profiler
|
Elena Laskavaia
08/03/2010 10:47 AM
post61423
|
Re: Accuracy of application profiler
There are few profiling methods to consider depends on your systems, for
simplicity we give users two choices:
sampling + call count instrumentation
or function instrumentation
If you do function instrumentation you have also two choice: system-wide
and single app.
The answer depends on what method you using.
Sampling require long running up, it is statistical method. It will only
count sample if process is running (i.e. if it is blocked it won't be
counted). Limitation: cannot use on multi-core cpu unless all threads
are bound to cpu 0
Function Instrumentation in single app mode - counts elapsed time (in
6.4.1), i.e. no context switches considered, also it is not good for
multiple threads app if all threads are active. Profiling overhead is
removed from final data.
Function Instrumentation in system-wide mode, same as above if you using
App Profiler tool, but you also can use System Profiler tool - where you
see non-aggregated data,
including context switches, and you can see statistics data for threads
states, and so on.
It is very precise but generates lots of data, so you cannot really
profiler more than a minute in this mode.
If you give me more details on your scenario I can recommend one method
over the other.
Girisha SG wrote:
> I have built the executable for ARM cortex A8 NEON processor and profiling the code using the momentics ICE 6.4.1 and
the target board.
>
> 1. Whether the profiling is accurate ?
> 2. Does the profiling also includes the context switching time while executing any process ?
> 3. How to get accurate time (i.e. only time taken taken to run each function excluding system overheads and context
switching time etc) for any function ?
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post61320
>
>
|
|
|