cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
8,029 Views
Registered: ‎06-23-2014

Profiling Linux Applications

Jump to solution

Has anyone any tips for the best way to profile a Linux application running on ZC702 (Linux release is 2014.2).

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
13,102 Views
Registered: ‎09-10-2008
Based on a bit of investigation I did I would say perf is a good approach (but not an expert yet). It is in the kernel tree and builds easily even though it's not in the normal ramdisk. It seems like a newer better approach than oprofile.

My notes show I got perf to build (and run) by setting CROSS_COMPILE=arm-xilinx-linux-gnueabi- and ARCH=arm, then make works from kernel/tools/perf directory.

Some links from my notes.

http://en.wikipedia.org/wiki/Perf_(Linux)
http://www.brendangregg.com/perf.html (really good, has build instructions)
https://perf.wiki.kernel.org/index.php/Tutorial


View solution in original post

0 Kudos
5 Replies
Highlighted
Explorer
Explorer
8,018 Views
Registered: ‎10-25-2011

You mean like perf?

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
13,103 Views
Registered: ‎09-10-2008
Based on a bit of investigation I did I would say perf is a good approach (but not an expert yet). It is in the kernel tree and builds easily even though it's not in the normal ramdisk. It seems like a newer better approach than oprofile.

My notes show I got perf to build (and run) by setting CROSS_COMPILE=arm-xilinx-linux-gnueabi- and ARCH=arm, then make works from kernel/tools/perf directory.

Some links from my notes.

http://en.wikipedia.org/wiki/Perf_(Linux)
http://www.brendangregg.com/perf.html (really good, has build instructions)
https://perf.wiki.kernel.org/index.php/Tutorial


View solution in original post

0 Kudos
Highlighted
Contributor
Contributor
7,984 Views
Registered: ‎06-23-2014

Yes, I mean like perf/oprofile. Thanks for the information I will give it a try.

0 Kudos
Contributor
Contributor
7,978 Views
Registered: ‎06-23-2014

Got it built OK, but it does not seem to work! For example perf top just sits there and reports no activity is occurring. I have checked the kernel configuration and the performance counters etc. are all enabled. Can anyone shed any light on the subject.

0 Kudos
Highlighted
Visitor
Visitor
6,478 Views
Registered: ‎11-20-2014

I also can't get perf to collect any data. I've found what looks to be the relevent kernel option to enable teh perf logging but it hasn't helped.

 

I've also compiled up a version of valgrind, but I can't manage to sort out a debug version of libc so that valgrind will run. 

 

There appears to be more gotchas around this than the previous posters imply.

0 Kudos