From: "Alexis Lothoré via buildroot" <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
"Olivier Benjamin" <olivier.benjamin@bootlin.com>,
"Alexis Lothoré" <alexis.lothore@bootlin.com>
Subject: [Buildroot] [PATCH v2 1/2] package/linux-tools: perf: build with libtraceevent support when it is selected
Date: Wed, 09 Jul 2025 17:04:14 +0200 [thread overview]
Message-ID: <20250709-perf_libtraceevent-v2-1-3ea54fbe6b5b@bootlin.com> (raw)
In-Reply-To: <20250709-perf_libtraceevent-v2-0-3ea54fbe6b5b@bootlin.com>
When trying to perform a custom uprobe recording on a target with perf
built by buildroot, the recording step fails as perf can not record
uprobes without libtraceevent support:
$ perf probe -x linked_list insert_name index
Target program is compiled without optimization. Skipping prologue.
Probe on address 0x808 to force probing at the function entry.
Added new event:
probe_linked_list:insert_name (on insert_name in /root/gdb/linked_list with index)
perf is not linked with libtraceevent, to use the new probe you can use tracefs:
cd /sys/kernel/tracing/
echo 1 > events/probe_linked_list/insert_name/enable
echo 1 > tracing_on
cat trace_pipe
Before removing the probe, echo 0 > events/probe_linked_list/insert_name/enable
$ perf record -e probe_linked_list:insert_name ./linked_list
event syntax error: 'probe_linked_list:insert_name'
\___ unsupported tracepoint
libtraceevent is necessary for tracepoint support
Run 'perf list' for a list of valid events
Usage: perf record [<options>] [<command>]
or: perf record [<options>] -- <command> [<options>]
-e, --event <event> event selector. use 'perf list' to list available events
libtraceevent support for perf has been disabled with commit
b4ab45a5c1db ("package/linux-tools: disable libtracevent detection")
because there was no libtraceevent package in buildroot to replace the
former libtraceevent removed from the kernel sources. Since then, commit
1474f1b34b17 ("package/libtraceevent: new package") has introduced a
libtraceevent package. We can then expose again the possibility to build
perf with libtraceevent support.
Make buildroot perf makefile detect if libtraceevent package has been
enabled, and if so, allow to build perf with libtraceevent support.
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
Changes in v2:
- no change
---
package/linux-tools/linux-tool-perf.mk.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in
index d67318571aa4deefde5b38effe1ade0b87f4627b..1e19ee7f1c4e46d210c079d796f9461f2bfaae08 100644
--- a/package/linux-tools/linux-tool-perf.mk.in
+++ b/package/linux-tools/linux-tool-perf.mk.in
@@ -28,7 +28,6 @@ PERF_MAKE_FLAGS = \
NO_LIBPERL=1 \
NO_LIBPYTHON=1 \
NO_LIBBIONIC=1 \
- NO_LIBTRACEEVENT=1 \
NO_SHELLCHECK=1
# We need to pass an argument to ld for setting the emulation when
@@ -128,6 +127,12 @@ PERF_MAKE_FLAGS += CORESIGHT=1
# bare "ifdef CORESIGHT" constructs.
endif
+ifeq ($(BR2_PACKAGE_LIBTRACEEVENT),y)
+PERF_DEPENDENCIES += libtraceevent
+else
+PERF_MAKE_FLAGS += NO_LIBTRACEEVENT=1
+endif
+
# We really do not want to build the perf documentation, because it
# has stringent requirement on the documentation generation tools,
# like xmlto and asciidoc), which may be lagging behind on some
--
2.50.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-07-09 15:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 15:04 [Buildroot] [PATCH v2 0/2] packages/linux-tools: perf: allow building perf with libtraceevent Alexis Lothoré via buildroot
2025-07-09 15:04 ` Alexis Lothoré via buildroot [this message]
2025-07-21 8:19 ` [Buildroot] [PATCH v2 1/2] package/linux-tools: perf: build with libtraceevent support when it is selected Luca Ceresoli via buildroot
2025-12-29 17:55 ` Julien Olivain via buildroot
2026-01-13 19:45 ` Arnout Vandecappelle via buildroot
2025-07-09 15:04 ` [Buildroot] [PATCH v2 2/2] packages/linux-tools: perf: enforce PKG_CONFIG_LIBDIR Alexis Lothoré via buildroot
2025-07-21 8:20 ` Luca Ceresoli via buildroot
2026-01-13 19:45 ` Arnout Vandecappelle via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250709-perf_libtraceevent-v2-1-3ea54fbe6b5b@bootlin.com \
--to=buildroot@buildroot.org \
--cc=alexis.lothore@bootlin.com \
--cc=luca.ceresoli@bootlin.com \
--cc=olivier.benjamin@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.