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@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Clarke <pc@us.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Stephane Eranian <eranian@google.com> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Vineet Singh <vineet.singh@intel.com> Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: zhengjun.xing@intel.com Link: https://lore.kernel.org/r/20220105061351.120843-22-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
dfc66beff7
commit
92aad5c33f
@@ -24,16 +24,18 @@ struct aggr_cpu_id {
|
|||||||
int core;
|
int core;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** A collection of aggr_cpu_id values, the "built" version is sorted and uniqued. */
|
||||||
struct cpu_aggr_map {
|
struct cpu_aggr_map {
|
||||||
refcount_t refcnt;
|
refcount_t refcnt;
|
||||||
|
/** Number of valid entries. */
|
||||||
int nr;
|
int nr;
|
||||||
|
/** The entries. */
|
||||||
struct aggr_cpu_id map[];
|
struct aggr_cpu_id map[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct perf_record_cpu_map_data;
|
struct perf_record_cpu_map_data;
|
||||||
|
|
||||||
struct perf_cpu_map *perf_cpu_map__empty_new(int nr);
|
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);
|
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);
|
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);
|
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);
|
typedef struct aggr_cpu_id (*aggr_cpu_id_get_t)(int cpu, void *data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user