I have been trying to compile and use perf in the environment provided by the GSRDs. So far I have managed to compile it with minimum support (only glibc). However this limited functionality does not produce perf records that are very human-readable. I have been trying to at least add elf and dwarf support and this has been rather challenging.
I have managed to compile and install into the compiler’s area libdwarf and libelf:
git clone https://github.com/WolfgangSt/libelf.git
make instroot=$COMPILER_PATH/ install
git clone https://github.com/tomhughes/libdwarf.git
LDFLAGS="$LDFLAGS" CC="$CROSS_COMPILE"gcc HOSTCC=gcc make all
cp libdwarf.a $LIB_PATH
cp libdwarf.a $LIB_PATH/libdw.a
mkdir -p $INC_PATH/ldwarf
mkdir -p $INC_PATH/ldw
cp libdwarf.h $INC_PATH/ldwarf
# Make a copy onto libdw
cp libdwarf.h $INC_PATH/ldw/libdw.h
I have tried to disable the feature checks to then hack the build system without success. Just for completeness see below my makefile call:
export PCFLAGS="--sysroot=/opt/intelFPGA/17.0/embedded/ds-5/sw/gcc/arm-linux-gnueabihf -O3 -pipe -g\
-feliminate-unused-debug-types -fno-omit-frame-pointer -march=armv7-a -funwind-tables"
make perf \
EXTRA_CFLAGS="$PCFLAGS -I/opt/intelFPGA/17.0/embedded/ds-5/sw/gcc/arm-linux-gnueabihf/include" \
LDFLAGS="-L/opt/intelFPGA/17.0/embedded/ds-5/sw/gcc/arm-linux-gnueabihf/lib $LDFLAGS" \
V=1 VF=1 NO_LIBPYTHON=1
However this has not been successful. I have found an email thread by the maintainers where they deal with this problem, but I believe that they have dealt with this in a newer version of the kernel:
Has anyone managed to overcome this? Does anyone has any suggestions on how to get perf compiled with dwarf support for the kernel provided with the GSRD?
I have gotten the source code for the kernel from here:
export KBRANCH=socfpga-4.1.33-ltsi # Check above for release branch to use
And, I am trying this on an Arria10 SoC devkit.
Many thanks in advance!