[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fWednJQmogBst5LVia8WehaR39o53_dxCJUmaYWpGN2FQ@mail.gmail.com>
Date:   Thu, 5 May 2022 17:55:25 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>,
        Alexey Bayduraev <alexey.v.bayduraev@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Leo Yan <leo.yan@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V1 21/23] libperf evsel: Add comments for booleans
On Thu, May 5, 2022 at 9:58 AM Adrian Hunter <adrian.hunter@...el.com> wrote:
>
> Add comments for 'system_wide' and 'requires_cpu' booleans
>
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
>  tools/lib/perf/include/internal/evsel.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/tools/lib/perf/include/internal/evsel.h b/tools/lib/perf/include/internal/evsel.h
> index 77fbb8b97e5c..f613c3ae868e 100644
> --- a/tools/lib/perf/include/internal/evsel.h
> +++ b/tools/lib/perf/include/internal/evsel.h
> @@ -49,7 +49,15 @@ struct perf_evsel {
>
>         /* parse modifier helper */
>         int                      nr_members;
> +       /*
> +        * system_wide is for events that need to be on every CPU, irrespective
> +        * of user requested CPUs or threads.
Will the cpu map agree with this? If not, what is the case for
all_cpus computed in propagate maps? Could we add this to comment.
> +        */
>         bool                     system_wide;
> +       /*
> +        * Some events, for example uncore events, require a CPU.
> +        * i.e. it cannot be -1
nit: perhaps "cannot be 'any CPU' (-1)."
Thanks,
Ian
> +        */
>         bool                     requires_cpu;
>         int                      idx;
>  };
> --
> 2.25.1
>
Powered by blists - more mailing lists
 
