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>
This commit is contained in:
Ian Rogers
2026-04-01 09:13:22 -07:00
committed by Namhyung Kim
parent 8a4aab17c3
commit fbfdf31432

View 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);