From e44035375ed927dc52073efd13c5d3df65ca7b52 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 21 Jun 2024 15:08:06 +0200 Subject: [PATCH] debug-info-defconfig: add debug symbols needed by pahole With this we can see the structures pahole -C 'snd_sof_dev' sound/soc/sof/snd-sof.o struct snd_sof_dev { struct device * dev; /* 0 8 */ spinlock_t ipc_lock; /* 8 72 */ /* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */ spinlock_t hw_lock; /* 80 72 */ /* --- cacheline 2 boundary (128 bytes) was 24 bytes ago --- */ bool dspless_mode_selected; /* 152 1 */ /* XXX 7 bytes hole, try to pack */ struct sof_firmware basefw; /* 160 16 */ /* XXX last struct has 4 bytes of padding */ struct snd_soc_component_driver plat_drv; /* 176 384 */ ... Signed-off-by: Pierre-Louis Bossart --- .github/workflows/buildtest.yml | 20 ++++++++++++++++++++ debug-info-defconfig | 3 +++ kconfig-sof-default.sh | 1 + 3 files changed, 24 insertions(+) create mode 100644 debug-info-defconfig diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index 4f26b60..eb107de 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -28,6 +28,11 @@ jobs: sudo apt update sudo apt install -y libelf-dev + - name: Install pahole + run: | + sudo apt update + sudo apt install -y pahole + - name: Install debhelper run: | sudo apt update @@ -54,6 +59,16 @@ jobs: repository: 'thesofproject/linux' path: 'linux' + - name: Install libelf + run: | + sudo apt update + sudo apt install -y libelf-dev + + - name: Install pahole + run: | + sudo apt update + sudo apt install -y pahole + - name: build start run: | export ARCH=i386 KCFLAGS="-Wall -Werror" @@ -108,6 +123,11 @@ jobs: sudo apt update sudo apt install -y libelf-dev + - name: Install pahole + run: | + sudo apt update + sudo apt install -y pahole + - name: build start run: | export ARCH=x86_64 CC=clang KCFLAGS="-Wall -Werror" diff --git a/debug-info-defconfig b/debug-info-defconfig new file mode 100644 index 0000000..210e776 --- /dev/null +++ b/debug-info-defconfig @@ -0,0 +1,3 @@ +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y +CONFIG_DEBUG_INFO_BTF=y diff --git a/kconfig-sof-default.sh b/kconfig-sof-default.sh index f0fff2e..5baa0db 100755 --- a/kconfig-sof-default.sh +++ b/kconfig-sof-default.sh @@ -22,4 +22,5 @@ $COMMAND .config \ "$KCONFIG_DIR"/soundwire-defconfig \ "$KCONFIG_DIR"/soundwire-codecs-defconfig \ "$KCONFIG_DIR"/bpf-defconfig \ + "$KCONFIG_DIR"/debug-info-defconfig \ "$@"