BPF List
 help / color / mirror / Atom feed
* [PATCH v4 0/3] perf tools: port UI from GTK2 to GTK4
@ 2026-09-06 17:18 Matt Turner
  2026-09-06 17:18 ` [PATCH v4 1/3] tools: port perf ui from GTK 2 to GTK 4 Matt Turner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matt Turner @ 2026-09-06 17:18 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, James Clark
  Cc: linux-kernel, linux-perf-users, bpf, Matt Turner

GTK2 is long dead upstream and increasingly hard to keep building on
current distros. This series ports perf's GTK-based report browser to
GTK4 and fixes it up so it's actually loadable at runtime after the
port.

Patch 1 does the mechanical port (build system, widget API changes).
Patch 2 fixes a runtime issue found after the port that prevented the
browser from loading. Patch 3 fixes leftover GTK2 calls the port missed
and a list-corruption race with the SIGINT/SIGTERM/etc. signal handler.

Signed-off-by: Matt Turner <mattst88@gmail.com>
---
Changes in v4:
- Fix gtk_widget_show()/gtk_widget_hide() calls left over from the GTK2
  port: both were removed in GTK 4. Replace with gtk_widget_set_visible(),
  adding a small wrapper for the info-bar "response" signal callback
- Block SIGSEGV/SIGFPE/SIGINT/SIGQUIT/SIGTERM around the
  perf_gtk__error_loops list updates in perf_gtk__error(): the signal
  handler (perf_gtk__signal() -> perf_gtk__exit() ->
  perf_gtk__quit_error_dialog()) walks that same list and could fire
  mid-update, corrupting it
- Link to v3: https://lore.kernel.org/r/20260906-perf-gtk2-v3-0-e1f2086214a0@gmail.com

Changes in v3:
- Fix GMainLoop leak if perf_gtk__error() is called re-entrantly: track
  active loops in a list instead of a single global pointer
- Add explicit <stdarg.h>/<stdio.h> includes instead of relying on
  transitive inclusion, which musl doesn't guarantee
- Drop the gtk4-infobar feature check and HAVE_GTK_INFO_BAR_SUPPORT:
  GtkInfoBar has been unconditionally available since well before GTK 4,
  and the check was failing outright due to its deprecation warning
- Link to v2: https://lore.kernel.org/r/20260906-perf-gtk2-v2-0-3eccff053cd1@gmail.com

Changes in v2:
- Fix error dialog's nested GMainLoop hanging if the parent window
  closes or a signal arrives while the dialog is open (quit from
  "destroy", not just "response")
- Fix build with GTK_INFO_BAR_SUPPORT: gtk_info_bar_get_content_area()
  is gone in GTK 4, use gtk_info_bar_add_child() instead
- Fix use-after-free in the progress dialog on manual close
- Fix reuse of an exhausted va_list in the vasprintf() failure path
- Link to v1: https://lore.kernel.org/r/20260906-perf-gtk2-v1-0-7564bf8523a9@gmail.com

---
Matt Turner (3):
      tools: port perf ui from GTK 2 to GTK 4
      perf tools: make the GTK4 report browser actually loadable at runtime
      perf tools: fix GTK4 leftover show/hide calls and error-loop list race

 tools/build/Makefile.feature                     |   4 +-
 tools/build/feature/Makefile                     |  10 +-
 tools/build/feature/test-gtk2-infobar.c          |  12 ---
 tools/build/feature/{test-gtk2.c => test-gtk4.c} |   4 +-
 tools/perf/Documentation/perf-report.txt         |   2 +-
 tools/perf/Makefile                              |   2 +-
 tools/perf/Makefile.config                       |  27 ++---
 tools/perf/Makefile.perf                         |   6 +-
 tools/perf/builtin-annotate.c                    |   8 +-
 tools/perf/builtin-report.c                      |   8 +-
 tools/perf/scripts/install-build-deps.sh         |   4 +-
 tools/perf/tests/make                            |   4 +-
 tools/perf/ui/gtk/annotate.c                     |  27 ++---
 tools/perf/ui/gtk/browser.c                      |  66 +++++++++---
 tools/perf/ui/gtk/gtk.h                          |  13 +--
 tools/perf/ui/gtk/hists.c                        |  33 +++---
 tools/perf/ui/gtk/progress.c                     |  40 +++++---
 tools/perf/ui/gtk/setup.c                        |   5 +-
 tools/perf/ui/gtk/util.c                         | 122 +++++++++++++++--------
 tools/perf/ui/setup.c                            |   2 +-
 tools/perf/util/annotate.c                       |  11 ++
 tools/perf/util/annotate.h                       |  12 +--
 22 files changed, 242 insertions(+), 180 deletions(-)
---
base-commit: 9f0346dcbea363787186c94ef94dd01aaa215afa
change-id: 20260906-perf-gtk2-555ca04bb652

Best regards,
-- 
Matt Turner <mattst88@gmail.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-06 17:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-06 17:18 [PATCH v4 0/3] perf tools: port UI from GTK2 to GTK4 Matt Turner
2026-09-06 17:18 ` [PATCH v4 1/3] tools: port perf ui from GTK 2 to GTK 4 Matt Turner
2026-09-06 17:27   ` sashiko-bot
2026-09-06 17:18 ` [PATCH v4 2/3] perf tools: make the GTK4 report browser actually loadable at runtime Matt Turner
2026-09-06 17:27   ` sashiko-bot
2026-09-06 17:18 ` [PATCH v4 3/3] perf tools: fix GTK4 leftover show/hide calls and error-loop list race Matt Turner
2026-09-06 17:29   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox