Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf stat: Rename perf_stat struct into perf_stat_evsel

It's used as the perf_evsel::priv data, so the name suits better. Also
we'll need the perf_stat name free for more generic struct.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Kan Liang <kan.liang@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1444992092-17897-29-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Jiri Olsa and committed by
Arnaldo Carvalho de Melo
581cc8a2 3a134ae9

+8 -8
+2 -2
tools/perf/builtin-stat.c
··· 434 434 435 435 static void print_noise(struct perf_evsel *evsel, double avg) 436 436 { 437 - struct perf_stat *ps; 437 + struct perf_stat_evsel *ps; 438 438 439 439 if (run_count == 1) 440 440 return; ··· 671 671 static void print_counter_aggr(struct perf_evsel *counter, char *prefix) 672 672 { 673 673 FILE *output = stat_config.output; 674 - struct perf_stat *ps = counter->priv; 674 + struct perf_stat_evsel *ps = counter->priv; 675 675 double avg = avg_stats(&ps->res_stats[0]); 676 676 int scaled = counter->counts->scaled; 677 677 double uval;
+5 -5
tools/perf/util/stat.c
··· 67 67 bool __perf_evsel_stat__is(struct perf_evsel *evsel, 68 68 enum perf_stat_evsel_id id) 69 69 { 70 - struct perf_stat *ps = evsel->priv; 70 + struct perf_stat_evsel *ps = evsel->priv; 71 71 72 72 return ps->id == id; 73 73 } ··· 84 84 85 85 void perf_stat_evsel_id_init(struct perf_evsel *evsel) 86 86 { 87 - struct perf_stat *ps = evsel->priv; 87 + struct perf_stat_evsel *ps = evsel->priv; 88 88 int i; 89 89 90 90 /* ps->id is 0 hence PERF_STAT_EVSEL_ID__NONE by default */ ··· 100 100 void perf_evsel__reset_stat_priv(struct perf_evsel *evsel) 101 101 { 102 102 int i; 103 - struct perf_stat *ps = evsel->priv; 103 + struct perf_stat_evsel *ps = evsel->priv; 104 104 105 105 for (i = 0; i < 3; i++) 106 106 init_stats(&ps->res_stats[i]); ··· 110 110 111 111 int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel) 112 112 { 113 - evsel->priv = zalloc(sizeof(struct perf_stat)); 113 + evsel->priv = zalloc(sizeof(struct perf_stat_evsel)); 114 114 if (evsel->priv == NULL) 115 115 return -ENOMEM; 116 116 perf_evsel__reset_stat_priv(evsel); ··· 304 304 struct perf_evsel *counter) 305 305 { 306 306 struct perf_counts_values *aggr = &counter->counts->aggr; 307 - struct perf_stat *ps = counter->priv; 307 + struct perf_stat_evsel *ps = counter->priv; 308 308 u64 *count = counter->counts->aggr.values; 309 309 int i, ret; 310 310
+1 -1
tools/perf/util/stat.h
··· 20 20 PERF_STAT_EVSEL_ID__MAX, 21 21 }; 22 22 23 - struct perf_stat { 23 + struct perf_stat_evsel { 24 24 struct stats res_stats[3]; 25 25 enum perf_stat_evsel_id id; 26 26 };