]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf trace: Guard __probe_ip suppression with evsel__is_probe()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 16 Jun 2026 01:17:41 +0000 (22:17 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 16 Jun 2026 01:17:41 +0000 (22:17 -0300)
trace__fprintf_tp_fields() compares every field name against
"__probe_ip" for all tracepoint events, but this field is only
implicitly added by the Ftrace subsystem to bare dynamic probes.

Add an evsel__is_probe() check before the strcmp so the string
comparison is skipped entirely for non-probe events.

Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c

index a8492da23a9cc178db5f8e09e382d1a3a084d406..57f3f14c5d435805c0973853316eb503edf1c85f 100644 (file)
@@ -3267,7 +3267,7 @@ static size_t trace__fprintf_tp_fields(struct trace *trace, struct perf_sample *
                 * If verbose mode is enabled, ensure it is formatted as a
                 * hexadecimal memory address rather than a signed integer.
                 */
-               if (!strcmp(field->name, "__probe_ip")) {
+               if (evsel__is_probe(evsel) && !strcmp(field->name, "__probe_ip")) {
                        if (!verbose)
                                continue;