[maemo-developers] Profiling on the device?

2006-02-22 Thread Timo Steuerwald

Hi all,

has anyone tried to profile an application on the device? - What is the 
best way to do this?


Cheers,

Timo
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] Profiling on the device?

2006-02-22 Thread Eero Tamminen
Hi,

 has anyone tried to profile an application on the device?
 What is the best way to do this?

Before profiling on the device, I would check it on PC:
- Grep the source code for 'float' and 'double' and get rid of
  everything using them, at least if it's anything frequently used
- Massif the source code and remove anything using memory excessively.
  If there's not enough memory for your program, there's no way you
  can make it faster before reducing the memory usage
- Cachegrind the source code and if it Kcachegrind shows any really
  major bottlenecks, fix those.  Really major bottlenecks should be
  bottlenecks also on the target, but you should take care how you
  optimize them (as on device there might be other major bottlenecks).
  Kcachegrind is really nice UI for this
- Valgrind that there are no definate memory leaks or Invalid
  memory accesses

Only then I would start looking into device specific bottlenecks.

Note that however you do the profiling, you have to validate your
optimizations on the device properly.  E.g. add to the critical places
in the code (before and after some functions doing a lot of work)
some timestamp output, or creating special test-code for this.
You should do several measurement rounds and use an average or
median values for comparing the speeds of original and optimized
software versions.

These timestamps can also be used to profile your code without
affecting significantly it's normal operational speed (like compiling
with -pg would or installing special kernel version could).


- Eero

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers