Re: [PATCH v5 15/50] perf maps: Add maps__for_each_map to call a function on each entry

From: Arnaldo Carvalho de Melo
Date: Wed Dec 06 2023 - 08:54:04 EST


Em Mon, Dec 04, 2023 at 03:46:08PM -0800, Namhyung Kim escreveu:
> On Mon, Nov 27, 2023 at 2:10 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> >
> > Most current uses of maps don't take the rwsem introducing a risk that
> > the maps will change during iteration. Introduce maps__for_each_map
> > that iterates the entries under the read lock of the rwsem. This
> > replaces the maps__for_each_entry macro that is moved into
> > maps.c. maps__for_each_entry_safe will be replaced in a later change.
> >
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> At first, I wanted to have each conversion in a separate commit.
> But it's all mechanical changes so probably ok to go together.

> Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

I think we should do it in separate commits, Ian, can you please
consider doing that, please?

I'm pushing what I have to tmp.perf-tools-next now.

- Arnaldo