From: sashiko-bot@kernel.org
To: "Matt Turner" <mattst88@gmail.com>
Cc: bpf@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v5 1/2] tools: port perf ui from GTK 2 to GTK 4
Date: Sun, 06 Sep 2026 18:40:20 +0000 [thread overview]
Message-ID: <20260906184020.D9FF71F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260906-perf-gtk2-v5-1-e8747a65c240@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Medium] Missing explicit inclusions of POSIX libc headers (`<stdio.h>`, `<stdarg.h>`, `<string.h>`) in `hists.c` and `annotate.c`, violating musl compatibility guidelines.
--
commit add3ec3dbce9f1d3bd46b20c11244baa3a6dfeae
Author: Matt Turner <mattst88@gmail.com>
tools: port perf ui from GTK 2 to GTK 4
This commit ports the perf GTK UI to GTK 4, migrating deprecated constructs
like GtkContainer and GdkScreen to their modern equivalents. It updates the
main and error-dialog loops to use explicit GMainLoops, defers exit signals,
and removes conditional checks for the GTK info bar.
> diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c
> index 8920e298420a8..b89389a3b92f1 100644
> --- a/tools/perf/ui/gtk/annotate.c
> +++ b/tools/perf/ui/gtk/annotate.c
[Severity: Medium]
This isn't a bug introduced by this patch, but since the commit message
mentions adding explicit inclusions for musl compatibility, does this file
also need <string.h> included directly?
Looking at perf_gtk__get_percent() in this file, it relies on strcpy():
perf_gtk__get_percent() {
...
strcpy(buf, "");
...
}
Since musl strictly separates declarations, relying on implicit includes
can cause compilation failures for environments building against it.
[ ... ]
> diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c
> index bae21f336ae6d..d8eec453dd094 100644
> --- a/tools/perf/ui/gtk/hists.c
> +++ b/tools/perf/ui/gtk/hists.c
[Severity: Medium]
This is a pre-existing issue, but similarly to the above, would it be
appropriate to explicitly include <stdio.h> and <stdarg.h> here to ensure
musl compatibility?
For example, perf_gtk__add_hierarchy_entries() uses snprintf():
perf_gtk__add_hierarchy_entries() {
...
snprintf(buf, sizeof(buf), "no entry >= %.2f%%", min_pcnt);
...
}
Additionally, __percent_color_snprintf() relies on va_list:
static int __percent_color_snprintf(struct perf_hpp *hpp, const char *fmt, ...)
Adding the explicit POSIX libc headers would prevent undefined function
errors on systems using musl instead of glibc.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260906-perf-gtk2-v5-0-e8747a65c240@gmail.com?part=1
next prev parent reply other threads:[~2026-09-06 18:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 18:26 [PATCH v5 0/2] perf tools: port UI from GTK2 to GTK4 Matt Turner
2026-09-06 18:26 ` [PATCH v5 1/2] tools: port perf ui from GTK 2 to GTK 4 Matt Turner
2026-09-06 18:40 ` sashiko-bot [this message]
2026-09-06 18:26 ` [PATCH v5 2/2] perf tools: make the GTK4 report browser actually loadable at runtime Matt Turner
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=20260906184020.D9FF71F00A3A@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 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.