diff options
| author | Jin Yao <[email protected]> | 2020-05-20 12:27:36 +0800 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-05-28 10:03:27 -0300 |
| commit | 905365f493e3469dc0dfea459a3beb34129357e8 (patch) | |
| tree | 2d7255ddff06a01badd3ecfd6971dbe62ac217da /tools/perf/scripts/python | |
| parent | 297767ac0ce598dece202e5c9e3f22e034cb4821 (diff) | |
perf stat: Save aggr value to first member of prev_raw_counts
To collect the overall statistics for interval mode, we copy the counts
from evsel->prev_raw_counts to evsel->counts.
For AGGR_GLOBAL mode, because the perf_stat_process_counter creates aggr
values from per cpu values, but the per cpu values are 0, so the
calculated aggr values will be always 0.
This patch uses a trick that saves the previous aggr value to the first
member of perf_counts, then aggr calculation in process_counter_values
can work correctly for AGGR_GLOBAL.
v6:
---
Add comments in perf_evlist__save_aggr_prev_raw_counts.
Signed-off-by: Jin Yao <[email protected]>
Reviewed-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jin Yao <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions