libperf evsel: Add comments for booleans
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 24 May 2022 07:54:34 +0000 (10:54 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 26 May 2022 15:36:57 +0000 (12:36 -0300)
Add comments for 'system_wide' and 'requires_cpu' booleans

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220524075436.29144-14-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/perf/include/internal/evsel.h

index 77fbb8b97e5cb9797911ddd8fc8b79c508d630d6..2a912a1f19898c1e8a8ac473709ee6d079a7dbe4 100644 (file)
@@ -49,7 +49,17 @@ 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. Map propagation will set cpus to
+        * this event's own_cpus, whereby they will contribute to evlist
+        * all_cpus.
+        */
        bool                     system_wide;
+       /*
+        * Some events, for example uncore events, require a CPU.
+        * i.e. it cannot be the 'any CPU' value of -1.
+        */
        bool                     requires_cpu;
        int                      idx;
 };