summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-04-01 19:13:22 +0300
committerNamhyung Kim <namhyung@kernel.org>2026-04-03 05:35:16 +0300
commitfbfdf3143271ca695061fa5882651bb512832044 (patch)
tree65424a4f7bb9912e42a43ae7be51154cbf524e1e /tools
parent8a4aab17c350f7c2ca7c459a9977f8e18f2878f6 (diff)
downloadlinux-fbfdf3143271ca695061fa5882651bb512832044.tar.xz
perf ordered-events: Event processing consistency with the regular reader
Some event processing functions like perf_event__process_tracing_data return a zero or positive value on success. Ordered event processing handles any non-zero value as an error, which is inconsistent with reader__process_events and reader__read_event that only treat negative values as errors. Make the ordered events error handling consistent with that of the events reader. Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/ordered-events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 8c62611f10aa..a5857f9f5af2 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -243,7 +243,7 @@ static int do_flush(struct ordered_events *oe, bool show_progress)
if (iter->timestamp > limit)
break;
ret = oe->deliver(oe, iter);
- if (ret)
+ if (ret < 0)
return ret;
ordered_events__delete(oe, iter);