perf evsel: Restore evsel->priv as a tool private area
When we started using it for stats and did it not just in
builtin-stat.c, but also for builtin-script.c, then it stopped being a
tool private area, so introduce a new pointer for these stats and leave
->priv to its original purpose.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: yuzhoujian <yuzhoujian@didichuxing.com>
Fixes: cfc8874a48 ("perf script: Process cpu/threads maps")
Link: http://lkml.kernel.org/n/tip-jtpzx3rjqo78snmmsdzwb2eb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -845,7 +845,7 @@ static void print_noise(struct perf_evsel *evsel, double avg)
|
||||
if (run_count == 1)
|
||||
return;
|
||||
|
||||
ps = evsel->priv;
|
||||
ps = evsel->stats;
|
||||
print_noise_pct(stddev_stats(&ps->res_stats[0]), avg);
|
||||
}
|
||||
|
||||
@@ -1432,7 +1432,7 @@ static void counter_aggr_cb(struct perf_evsel *counter, void *data,
|
||||
bool first __maybe_unused)
|
||||
{
|
||||
struct caggr_data *cd = data;
|
||||
struct perf_stat_evsel *ps = counter->priv;
|
||||
struct perf_stat_evsel *ps = counter->stats;
|
||||
|
||||
cd->avg += avg_stats(&ps->res_stats[0]);
|
||||
cd->avg_enabled += avg_stats(&ps->res_stats[1]);
|
||||
|
||||
Reference in New Issue
Block a user