lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 4 Jan 2022 22:13:24 -0800 From: Ian Rogers <irogers@...gle.com> To: Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>, John Garry <john.garry@...wei.com>, Kajol Jain <kjain@...ux.ibm.com>, "Paul A . Clarke" <pc@...ibm.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Riccardo Mancini <rickyman7@...il.com>, Kan Liang <kan.liang@...ux.intel.com>, Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Mark Rutland <mark.rutland@....com>, Alexander Shishkin <alexander.shishkin@...ux.intel.com>, linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org, Vineet Singh <vineet.singh@...el.com>, James Clark <james.clark@....com>, Mathieu Poirier <mathieu.poirier@...aro.org>, Suzuki K Poulose <suzuki.poulose@....com>, Mike Leach <mike.leach@...aro.org>, Leo Yan <leo.yan@...aro.org>, coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org, zhengjun.xing@...el.com Cc: eranian@...gle.com, Ian Rogers <irogers@...gle.com> Subject: [PATCH v4 21/48] perf cpumap: Add some comments to cpu_aggr_map Move cpu_aggr_map__empty_new to be with other cpu_aggr_map function. Reviewed-by: James Clark <james.clark@....com> Signed-off-by: Ian Rogers <irogers@...gle.com> --- tools/perf/util/cpumap.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index 32b8b5178f01..25a08d640d81 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -24,16 +24,18 @@ struct aggr_cpu_id { int core; }; +/** A collection of aggr_cpu_id values, the "built" version is sorted and uniqued. */ struct cpu_aggr_map { refcount_t refcnt; + /** Number of valid entries. */ int nr; + /** The entries. */ struct aggr_cpu_id map[]; }; struct perf_record_cpu_map_data; struct perf_cpu_map *perf_cpu_map__empty_new(int nr); -struct cpu_aggr_map *cpu_aggr_map__empty_new(int nr); struct perf_cpu_map *cpu_map__new_data(struct perf_record_cpu_map_data *data); size_t cpu_map__snprint(struct perf_cpu_map *map, char *buf, size_t size); @@ -67,6 +69,12 @@ int cpu__get_die_id(int cpu); */ int cpu__get_core_id(int cpu); +/** + * cpu_aggr_map__empty_new - Create a cpu_aggr_map of size nr with every entry + * being empty. + */ +struct cpu_aggr_map *cpu_aggr_map__empty_new(int nr); + typedef struct aggr_cpu_id (*aggr_cpu_id_get_t)(int cpu, void *data); /** -- 2.34.1.448.ga2b2bfdf31-goog
Powered by blists - more mailing lists