improve tracing
This started by me not being able to get `perf top` working, but in the
end I got additional tools as well. The `rtla timerlat` in particular
was useful to show me that a kernel thread waited up to 220ms at some
time, which means that it's about 10 times longer than the cutoff
threshold for reading 128 bytes out of the HW FIFO of MAX14830 running
at 57600 Baud. That might very well explain the FIFO overruns we saw on
the EDFAs.
Anyway, `perf top` still doesn't produce any useful output by default,
but the `-e cpu-clock` option appears to do the trick -- even if it's
apparently a SW metric. At least I see *something*.
Enabling CoreSight (BR2_PACKAGE_OPENCSD) had no effect, apparently
because our kernel doesn't enable that. Looking at the config options in
the kernel, that thing appears to be used on arm64, with some scary
mentions of "not being supported for 32bit programs". OTOH, the SoC
funciton specification *does* mention some coresight bits, but I have no
clue what it's all about, and the DTS appears to have no references to
anything CoreSight-related, so, well, let's not use that.
The kernel update was needed to enable the kernel's `perf` tool to find
`pkg-config` under Buildroot (branch `cesnet/2024-01-17`). Buildroot was
then updated so that these optional libs are indeed available.
Change-Id: I4779badd3b7df452b402815629edcef06abdb9b4
diff --git a/board/czechlight/clearfog/linux.fragment b/board/czechlight/clearfog/linux.fragment
index 0b3f385..afa3eed 100644
--- a/board/czechlight/clearfog/linux.fragment
+++ b/board/czechlight/clearfog/linux.fragment
@@ -52,4 +52,4 @@
CONFIG_INPUT_MOUSE=n
CONFIG_BPF_SYSCALL=y
-CONFIG_LOCALVERSION="-9-gc5f9c141ed67"
+CONFIG_LOCALVERSION="-10-gf918c39e5648"
diff --git a/board/czechlight/clearfog/patches/linux.patch b/board/czechlight/clearfog/patches/linux.patch
index bd5ae3b..9571ba8 100644
--- a/board/czechlight/clearfog/patches/linux.patch
+++ b/board/czechlight/clearfog/patches/linux.patch
@@ -359,3 +359,16 @@
regmaps[i] = devm_regmap_init_i2c(port_client, ®cfg_i2c);
}
+diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
+index 86569f230e60..b69ab2ae77c6 100644
+--- a/tools/perf/Makefile.perf
++++ b/tools/perf/Makefile.perf
+@@ -188,7 +188,7 @@ HOSTLD ?= ld
+ HOSTAR ?= ar
+ CLANG ?= clang
+
+-PKG_CONFIG = $(CROSS_COMPILE)pkg-config
++PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
+
+ RM = rm -f
+ LN = ln -f
diff --git a/configs/czechlight_clearfog_defconfig b/configs/czechlight_clearfog_defconfig
index e2b8e83..530a729 100644
--- a/configs/czechlight_clearfog_defconfig
+++ b/configs/czechlight_clearfog_defconfig
@@ -38,11 +38,16 @@
BR2_PACKAGE_LINUX_TOOLS_GPIO=y
BR2_PACKAGE_LINUX_TOOLS_IIO=y
BR2_PACKAGE_LINUX_TOOLS_PERF=y
+BR2_PACKAGE_LINUX_TOOLS_PERF_SCRIPTS=y
+BR2_PACKAGE_LINUX_TOOLS_PERF_TUI=y
+BR2_PACKAGE_LINUX_TOOLS_PERF_NEEDS_HOST_PYTHON3=y
+BR2_PACKAGE_LINUX_TOOLS_RTLA=y
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/common/busybox-config"
BR2_PACKAGE_ZSTD=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_GDB_DEBUGGER=y
BR2_PACKAGE_STRACE=y
+BR2_PACKAGE_BINUTILS=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_MMC_UTILS=y
BR2_PACKAGE_I2C_TOOLS=y
@@ -56,6 +61,7 @@
BR2_PACKAGE_NETOPEER2_CLI=y
BR2_PACKAGE_NGHTTP2_MRUBY=y
BR2_PACKAGE_ELFUTILS=y
+BR2_PACKAGE_LIBPFM4=y
BR2_PACKAGE_LIBUNWIND=y
BR2_PACKAGE_LINUX_PAM=y
BR2_PACKAGE_ETHTOOL=y
@@ -69,6 +75,7 @@
BR2_PACKAGE_INOTIFY_TOOLS=y
BR2_PACKAGE_AUDIT=y
BR2_PACKAGE_DDRESCUE=y
+BR2_PACKAGE_NUMACTL=y
BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_NETWORK=y
diff --git a/submodules/buildroot b/submodules/buildroot
index 965a3dc..8906c69 160000
--- a/submodules/buildroot
+++ b/submodules/buildroot
@@ -1 +1 @@
-Subproject commit 965a3dcc2ba6efb73cd7721570a6e8f4ef89f182
+Subproject commit 8906c691683d6532bd51e4f3a790f6b1ff48f31c