[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fXtahvLa5hFqdQpPyeHYsUNe=MkJBn8Yf5npNUvGJOU0w@mail.gmail.com>
Date: Tue, 21 May 2024 10:13:07 -0700
From: Ian Rogers <irogers@...gle.com>
To: John Garry <john.g.garry@...cle.com>
Cc: Weilin Wang <weilin.wang@...el.com>, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, Kan Liang <kan.liang@...ux.intel.com>,
Jing Zhang <renyu.zj@...ux.alibaba.com>, Sandipan Das <sandipan.das@....com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf jevents: Autogenerate empty-pmu-events.c
On Tue, May 21, 2024 at 4:45 AM John Garry <john.g.garry@...cle.com> wrote:
>
> On 20/05/2024 16:36, Ian Rogers wrote:
> > }
> > + ret = pmu_events_table__find_event_pmu(table, table_pmu, name, fn, data);
> > + if (ret != -1000)
> > + return ret;
> > + }
> > return -1000;
>
> what's -1000 meaning? It would be nice to use some standard error codes.
This is a pre-existing thing. 0 means continue and anything else
generally aborts a search, -1000 is used when searching multiple
tables to indicate not found in 1 table but potentially not all.
Commit 3d5045492ab2 ("perf pmu-events: Add
pmu_events_table__find_event()") added this [1], you were on the cc
list ;-) I think moving to a named constant would make this more
intention revealing so I'll add this to a v2 set.
Thanks,
Ian
[1] https://lore.kernel.org/r/20230824041330.266337-9-irogers@google.com
> Thanks,
> John
>
>
Powered by blists - more mailing lists