All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	Derek Foreman <derek.foreman@collabora.com>,
	Howard Chu <howardchu95@gmail.com>,
	Thomas Falcon <thomas.falcon@intel.com>,
	Swapnil Sapkal <swapnil.sapkal@amd.com>,
	Anubhav Shelat <ashelat@redhat.com>,
	Chun-Tse Shao <ctshao@google.com>,
	Hrishikesh Suresh <hrishikesh123s@gmail.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/7] perf ordered-events: Event processing consistency with the regular reader
Date: Wed, 4 Mar 2026 22:27:51 -0800	[thread overview]
Message-ID: <aakiZ_NyxlLvVSoy@z2> (raw)
In-Reply-To: <20260228065953.3226283-6-irogers@google.com>

On Fri, Feb 27, 2026 at 10:59:51PM -0800, Ian Rogers wrote:
> 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>
> ---
>  tools/perf/util/ordered-events.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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)

Are you sure all oe->deliver callbacks return negative for errors?

Thanks,
Namhyung


>  			return ret;
>  
>  		ordered_events__delete(oe, iter);
> -- 
> 2.53.0.473.g4a7958ca14-goog
> 

  reply	other threads:[~2026-03-05  6:27 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 [this message]
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   ` [PATCH v3 3/7] perf session: Extra logging for failed to process events Ian Rogers
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=aakiZ_NyxlLvVSoy@z2 \
    --to=namhyung@kernel.org \
    --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=irogers@google.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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.