perf utility on the altera clclone V socfpga board

aniket jesu
hi friends,
I have an altera cyclone v socfpga board, which has arm cortex a9 core.
on the board I have linux kernel 3.7 built using yocto.
I have one application code, for which I want to do profiling on this
board, for that I have wanted perf utility, so using yocto build system,
I have built the rootfs for this board including the perf utility in it.

after build, got the perf utility up and running, but whrn I used it, it is
showing some limited profiling of the application. like it is not showing
cache-misses and etc required stuff. but the same utility, i.e. perf with
the same application but running on the x86 shows all the complete
profiling. the output log of the profiling is:

--------------------------------------------------------------------->

      48446.736220 task-clock                #    0.990 CPUs utilized
              2716 context-switches          #    0.056 K/sec
                 0 cpu-migrations            #    0.000 K/sec
             25722 page-faults               #    0.531 K/sec
   <not supported> cycles
   <not supported> stalled-cycles-frontend
   <not supported> stalled-cycles-backend
   <not supported> instructions
   <not supported> branches
   <not supported> branch-misses
--------------------------------------------------------------------->

why is this not supported??

need some help guys.
thanks,
aniket

Suresh Nagarajan
I have run into issues where perf is not building using Yocto linux..

Do you have this working?  If so, what did you do get this working..

This is what I did so far

$ cd ~
$ git clone http://git.rocketboards.org/poky-socfpga.git  
$ cd  poky-socfpga/
$ git checkout -b <test_branch> ACDS14.0_REL_GSRD_PR
$ source ./altera-init build
$ bitbake perf 

Note: replace <test_branch> with the name of the branch you want to use
locally.


This fails with 

====================================================

[snagarajan@moltar-76 perf]$ alias armmake='make
CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm'
[snagarajan@moltar-76 perf]$
PATH=~/gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux/bin:$PATH
[snagarajan@moltar-76 perf]$ armmake install
  BUILD:   Doing 'make -j4' parallel build

Auto-detecting system features:
...                     backtrace: [ on  ]
...                         dwarf: [ on  ]
...                fortify-source: [ on  ]
...                         glibc: [ on  ]
...                          gtk2: [ OFF ]
...                  gtk2-infobar: [ OFF ]
...                      libaudit: [ on  ]
...                        libbfd: [ on  ]
...                        libelf: [ on  ]
...             libelf-getphdrnum: [ on  ]
...                   libelf-mmap: [ on  ]
...                       libnuma: [ OFF ]
...                       libperl: [ on  ]
...                     libpython: [ on  ]
...             libpython-version: [ on  ]
...                      libslang: [ OFF ]
...                     libunwind: [ OFF ]
...                       on-exit: [ on  ]
...                stackprotector: [ on  ]
...            stackprotector-all: [ on  ]
...                       timerfd: [ on  ]

config/Makefile:329: No libunwind found, disabling post unwind support.
Please install libunwind-dev[el] >= 1.1
config/Makefile:368: slang not found, disables TUI support. Please install
slang-devel or libslang-dev
config/Makefile:381: GTK2 not found, disables GTK2 support. Please install
gtk2-devel or libgtk2.0-dev
config/Makefile:536: No numa.h found, disables 'perf bench numa mem'
benchmark, please install numa-libs-devel or libnuma-dev
  FLEX     util/pmu-flex.c
  CC       util/environment.o
  CC       util/event.o
  CC       util/evlist.o
In file included from util/callchain.h:8:0,
                 from util/hist.h:6,
                 from util/evsel.h:11,
                 from util/evlist.h:8,
                 from util/evlist.c:15:
util/symbol.h:17:20: fatal error: libelf.h: No such file or directory
#include <libelf.h>
                    ^
compilation terminated.
make[1]: *** [util/evlist.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from util/sort.h:11:0,
                 from util/event.c:5:
util/symbol.h:17:20: fatal error: libelf.h: No such file or directory
#include <libelf.h>
                    ^
compilation terminated.
make[1]: *** [util/event.o] Error 1
make: *** [install] Error 2