]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf ordered-events: Event processing consistency with the regular reader
authorIan Rogers <irogers@google.com>
Wed, 1 Apr 2026 16:13:22 +0000 (09:13 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 3 Apr 2026 02:35:16 +0000 (19:35 -0700)
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>
tools/perf/util/ordered-events.c

index 8c62611f10aa456c3f7fe0d93e5e210adf9b1883..a5857f9f5af2d3dea05c3ab554caf9487757abaa 100644 (file)
@@ -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);