From: sashiko-bot@kernel.org
To: "Matt Turner" <mattst88@gmail.com>
Cc: linux-perf-users@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v7 2/3] perf tools: make the GTK4 report browser actually loadable at runtime
Date: Sun, 06 Sep 2026 20:23:25 +0000 [thread overview]
Message-ID: <20260906202325.EB6791F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260906-perf-gtk2-v7-2-1ece839fbca0@gmail.com>
> perf report --gtk dlopen()s libperf-gtk.so, which expects to resolve
> symbols back against the running perf binary (callchain_param,
> symbol_conf, evsel__name, and friends live in perf, not the plugin).
> Two things broke that after the GTK 4 port:
>
> perf never passed -rdynamic, so none of its symbols were in its
> dynamic symbol table for a dlopen()ed plugin to find. Add -rdynamic to
> LDFLAGS when GTK4 support is enabled.
>
> annotated_source__hist_entry() was a static inline in annotate.h, so
> ui/gtk/annotate.c calling it pulled hashmap__find()'s expansion,
> hashmap_find(), into libperf-gtk.so as an undefined symbol. The only
> hashmap_find perf links against normally is libbpf's internal one
> (tools/lib/bpf/hashmap.c), built with -fvisibility=hidden, so it can
> never be exported to a dlopen()ed plugin regardless of LDFLAGS. Move
> annotated_source__hist_entry() into annotate.c as an ordinary exported
> function, so the plugin depends on it the same way it already depends
> on evsel__group_desc() and friends.
>
> With both fixes, a default 'make GTK4=1' build (libbpf statically
> linked) can dlopen() libperf-gtk.so and open the report browser without
> NO_LIBBPF=1 or manual LDFLAGS. Verified with perf report --gtk against
> real perf.data on a GTK4 desktop.
>
> Signed-off-by: Matt Turner <mattst88@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260906-perf-gtk2-v7-0-1ece839fbca0@gmail.com?part=2
next prev parent reply other threads:[~2026-09-06 20:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 20:13 [PATCH v7 0/3] perf tools: port UI from GTK2 to GTK4 Matt Turner
2026-09-06 20:13 ` [PATCH v7 1/3] tools: port perf ui from GTK 2 to GTK 4 Matt Turner
2026-09-06 20:25 ` sashiko-bot
2026-09-06 20:52 ` Matt Turner
2026-09-06 20:13 ` [PATCH v7 2/3] perf tools: make the GTK4 report browser actually loadable at runtime Matt Turner
2026-09-06 20:23 ` sashiko-bot [this message]
2026-09-06 20:13 ` [PATCH v7 3/3] perf tools gtk: fix two hierarchy-view stack buffer overflows Matt Turner
2026-09-06 20:25 ` sashiko-bot
2026-09-06 20:59 ` [PATCH v7 0/3] perf tools: port UI from GTK2 to GTK4 Alexei Starovoitov
2026-09-06 21:05 ` Matt Turner
2026-09-08 17:28 ` Ian Rogers
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=20260906202325.EB6791F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox