[riot-devel] gprof for non-native boards
mail at daniel-krebs.net
Mon Aug 22 15:49:51 CEST 2016
if your just interested in the call path and speed is no concern, I
imagine that you could implement this relatively easy on your own. GCC
can generate hooks for each function call  that you could use to
print directly via serial and later resolve names using the linker map file.
However, you won't be able to get meaningful benchmarks as this would
slow down the code *a lot*. Still, if you're interested in statistics
about which functions your code visted the most, kCacheGrind is a nice
tool for visualization with a really simple syntax.
Not long ago I needed a profiler for an x86 OS (no Linux!) and also had
a look at gmon/gperf. At that time, it seemed easier to integrate XRay
 into my project, but I guess this will not fit for an embedded target.
Am 22.08.2016 um 15:16 schrieb Martine Lenders:
> for stack memory optimizations in GNRC I need some kind of tool to
> analyze the call-path of its threads (the stackusage of each function
> itself can easily determined using GCC ). After some experiments
> with some static solutions (I basically went through the list here
> ) I wasn't able to come to a satisfying result, so I want to go for
> a run-time solution. However, we have (undocumented) support for gprof
> on native . Has anyone experience with gprof on non-native boards?
> What tools do I need to install besides the respective gprof-version?
> How do I connect gprof to the board?
>  https://gcc.gnu.org/onlinedocs/gnat_ugn/Static-Stack-Usage-Analysis.html
>  https://en.wikipedia.org/wiki/Call_graph#Free_software_call-graph_generators
>  https://github.com/RIOT-OS/RIOT/blob/master/boards/native/Makefile.include#L156-L159
> devel mailing list
> devel at riot-os.org
More information about the devel