[PATCH 08/24] perf stat: Rename struct perf_counts::cpu member to values
From: Arnaldo Carvalho de Melo
Date: Fri Jun 26 2015 - 11:45:54 EST
From: Jiri Olsa <jolsa@xxxxxxxxxx>
Renaming 'struct xyarray *cpu' pointer to more fitting/generic values,
because now we store both cpu and thread values.
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1435310967-14570-8-git-send-email-jolsa@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/stat.c | 12 ++++++------
tools/perf/util/stat.h | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 7bcc19b62dd1..197a2db5f2c4 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -100,15 +100,15 @@ struct perf_counts *perf_counts__new(int ncpus, int nthreads)
struct perf_counts *counts = zalloc(sizeof(*counts));
if (counts) {
- struct xyarray *cpu;
+ struct xyarray *values;
- cpu = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values));
- if (!cpu) {
+ values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values));
+ if (!values) {
free(counts);
return NULL;
}
- counts->cpu = cpu;
+ counts->values = values;
}
return counts;
@@ -117,14 +117,14 @@ struct perf_counts *perf_counts__new(int ncpus, int nthreads)
void perf_counts__delete(struct perf_counts *counts)
{
if (counts) {
- xyarray__delete(counts->cpu);
+ xyarray__delete(counts->values);
free(counts);
}
}
static void perf_counts__reset(struct perf_counts *counts)
{
- xyarray__reset(counts->cpu);
+ xyarray__reset(counts->values);
}
void perf_evsel__reset_counts(struct perf_evsel *evsel)
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index e0b8dc50fbb6..295d1e29d3d6 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -46,13 +46,13 @@ struct perf_counts_values {
struct perf_counts {
s8 scaled;
struct perf_counts_values aggr;
- struct xyarray *cpu;
+ struct xyarray *values;
};
static inline struct perf_counts_values*
perf_counts(struct perf_counts *counts, int cpu, int thread)
{
- return xyarray__entry(counts->cpu, cpu, thread);
+ return xyarray__entry(counts->values, cpu, thread);
}
void update_stats(struct stats *stats, u64 val);
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/