i have a simple program whose performance is to be measured on a arm cortex a7 machine with linux 3.10 and perf tool 3.4 version
program:
#include<stdio.h>
int i=0;
void main2(void)
{
for(i=0;i<20000;i++);
}
void main3(void)
{
for(i=0;i<30000;i++);
}
void main4(void)
{
for(i=0;i<40000;i++);
}
void main5(void)
{
for(i=0;i<50000;i++);
}
main(void)
{
printf("Main2\n");
main2();
printf("Main3\n");
main3();
printf("Main4\n");
main4();
printf("Main5\n");
main5();
}
perf tool data vizualized using flame graph
#perf record -F 5000 -g a.out
#perf script 1>temp1 2>temp2
#stackcollapse-perf.pl temp1 > temp
#flamegraph.pl temp > temp.svg
temp.svg is below
so my doubt here is what are the unknown traces why would they occur, the reason why i increased my sampling rate to 5000 is i am not able to view main2 and main3 if its around 99
UPDATE:
the above unknown
symbols are because the perf doesnt know our symbols on a cross platform, so the graph just puts unknown in the hex address of unknown symbols, so its suggested to provide vmlinux file as input to its report
, even after provided it. i have observed the report of the perf
throws a error along with the report
[trout_fm] with build id 71f5660a1b9cba292e6bb94a5ba3ac20644852dd not found, continuing without symbols
this is because my vmlinux build id and the buildid with perf.data are not matching ? i think so !
if so, from where did the perf.data get the build id any way ?
provided i have carefully flashed the same image and using same vmlinux
perf report -k vmlinux
can any one please help me ? to overcome this issue .