From: Ian Rogers <irogers@google.com>
To: acme@kernel.org, namhyung@kernel.org
Cc: irogers@google.com, adrian.hunter@intel.com,
alexander.shishkin@linux.intel.com, ashelat@redhat.com,
ctshao@google.com, derek.foreman@collabora.com,
howardchu95@gmail.com, hrishikesh123s@gmail.com,
james.clark@linaro.org, jolsa@kernel.org,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
mingo@redhat.com, peterz@infradead.org, swapnil.sapkal@amd.com,
thomas.falcon@intel.com
Subject: [PATCH v3 3/7] perf session: Extra logging for failed to process events
Date: Tue, 31 Mar 2026 22:52:02 -0700 [thread overview]
Message-ID: <20260401055206.43187-4-irogers@google.com> (raw)
In-Reply-To: <20260401055206.43187-1-irogers@google.com>
Print log information in ordered event processing so that the cause of
finished round failing is clearer. Print the event name along with its
number when an event isn't processed. Add extra detail about where the
failure happened.
The following log lines come from running `perf data convert`. Before:
0xa250 [0x10]: failed to process type: 80
After:
0xa250 [0x10]: piped event processing failed for event of type: FEATURE (80)
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/util/session.c | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 4b465abfa36c..492515789d3d 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -131,10 +131,17 @@ static int ordered_events__deliver_event(struct ordered_events *oe,
{
struct perf_session *session = container_of(oe, struct perf_session,
ordered_events);
+ int ret = perf_session__deliver_event(session, event->event,
+ session->tool, event->file_offset,
+ event->file_path);
- return perf_session__deliver_event(session, event->event,
- session->tool, event->file_offset,
- event->file_path);
+ if (ret) {
+ pr_err("%#" PRIx64 " [%#x]: ordered event processing failed (%d) for event of type: %s (%d)\n",
+ event->file_offset, event->event->header.size, ret,
+ perf_event__name(event->event->header.type),
+ event->event->header.type);
+ }
+ return ret;
}
struct perf_session *__perf_session__new(struct perf_data *data,
@@ -2110,8 +2117,10 @@ static int __perf_session__process_pipe_events(struct perf_session *session)
}
if ((skip = perf_session__process_event(session, event, head, "pipe")) < 0) {
- pr_err("%#" PRIx64 " [%#x]: failed to process type: %d\n",
- head, event->header.size, event->header.type);
+ pr_err("%#" PRIx64 " [%#x]: piped event processing failed for event of type: %s (%d)\n",
+ head, event->header.size,
+ perf_event__name(event->header.type),
+ event->header.type);
err = -EINVAL;
goto out_err;
}
@@ -2225,8 +2234,10 @@ static int __perf_session__process_decomp_events(struct perf_session *session)
if (size < sizeof(struct perf_event_header) ||
(skip = perf_session__process_event(session, event, decomp->file_pos,
decomp->file_path)) < 0) {
- pr_err("%#" PRIx64 " [%#x]: failed to process type: %d\n",
- decomp->file_pos + decomp->head, event->header.size, event->header.type);
+ pr_err("%#" PRIx64 " [%#x]: decompress event processing failed for event of type: %s (%d)\n",
+ decomp->file_pos + decomp->head, event->header.size,
+ perf_event__name(event->header.type),
+ event->header.type);
return -EINVAL;
}
@@ -2382,8 +2393,9 @@ reader__read_event(struct reader *rd, struct perf_session *session,
if (size < sizeof(struct perf_event_header) ||
(skip = rd->process(session, event, rd->file_pos, rd->path)) < 0) {
errno = -skip;
- pr_err("%#" PRIx64 " [%#x]: failed to process type: %d [%m]\n",
+ pr_err("%#" PRIx64 " [%#x]: processing failed for event of type: %s (%d) [%m]\n",
rd->file_offset + rd->head, event->header.size,
+ perf_event__name(event->header.type),
event->header.type);
err = skip;
goto out;
--
2.53.0.1118.gaef5881109-goog
next prev parent reply other threads:[~2026-04-01 5:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 6:59 [PATCH v2 0/7] perf data/pipe handling improvements Ian Rogers
2026-02-28 6:59 ` [PATCH v2 1/7] perf clockid: Add missing include Ian Rogers
2026-02-28 6:59 ` [PATCH v2 2/7] perf header: Add utility to convert feature number to a string Ian Rogers
2026-02-28 6:59 ` [PATCH v2 3/7] perf session: Extra logging for failed to process events Ian Rogers
2026-02-28 6:59 ` [PATCH v2 4/7] perf header: Refactor pipe mode end marker handling Ian Rogers
2026-03-05 6:23 ` Namhyung Kim
2026-04-01 5:26 ` Ian Rogers
2026-02-28 6:59 ` [PATCH v2 5/7] perf ordered-events: Event processing consistency with the regular reader Ian Rogers
2026-03-05 6:27 ` Namhyung Kim
2026-04-01 5:29 ` Ian Rogers
2026-02-28 6:59 ` [PATCH v2 6/7] perf evsel: Make unknown event names more unique Ian Rogers
2026-02-28 6:59 ` [PATCH v2 7/7] perf data convert ctf: Pipe mode improvements Ian Rogers
2026-03-05 6:39 ` Namhyung Kim
2026-04-01 5:51 ` [PATCH v3 0/7] perf data/pipe handling improvements Ian Rogers
2026-04-01 5:52 ` [PATCH v3 1/7] perf clockid: Add missing include Ian Rogers
2026-04-01 5:52 ` [PATCH v3 2/7] perf header: Add utility to convert feature number to a string Ian Rogers
2026-04-01 5:52 ` Ian Rogers [this message]
2026-04-01 5:52 ` [PATCH v3 4/7] perf header: Refactor pipe mode end marker handling Ian Rogers
2026-04-01 5:52 ` [PATCH v3 5/7] perf ordered-events: Event processing consistency with the regular reader Ian Rogers
2026-04-01 5:52 ` [PATCH v3 6/7] perf evsel: Make unknown event names more unique Ian Rogers
2026-04-01 5:52 ` [PATCH v3 7/7] perf data convert ctf: Pipe mode improvements Ian Rogers
2026-04-01 16:13 ` [PATCH v4 0/8] perf data/pipe handling improvements Ian Rogers
2026-04-01 16:13 ` [PATCH v4 1/8] perf clockid: Add missing include Ian Rogers
2026-04-01 16:13 ` [PATCH v4 2/8] perf header: Add utility to convert feature number to a string Ian Rogers
2026-04-01 16:13 ` [PATCH v4 3/8] perf header: Properly warn/print when libtraceevent/libbpf support is missing Ian Rogers
2026-04-01 16:13 ` [PATCH v4 4/8] perf session: Extra logging for failed to process events Ian Rogers
2026-04-01 16:13 ` [PATCH v4 5/8] perf header: Refactor pipe mode end marker handling Ian Rogers
2026-04-01 16:13 ` [PATCH v4 6/8] perf ordered-events: Event processing consistency with the regular reader Ian Rogers
2026-04-01 16:13 ` [PATCH v4 7/8] perf evsel: Make unknown event names more unique Ian Rogers
2026-04-01 16:13 ` [PATCH v4 8/8] perf data convert ctf: Pipe mode improvements Ian Rogers
2026-04-04 0:15 ` [PATCH v4 0/8] perf data/pipe handling improvements Namhyung Kim
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=20260401055206.43187-4-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ashelat@redhat.com \
--cc=ctshao@google.com \
--cc=derek.foreman@collabora.com \
--cc=howardchu95@gmail.com \
--cc=hrishikesh123s@gmail.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=swapnil.sapkal@amd.com \
--cc=thomas.falcon@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox