perf kvm: Refactor overall statistics
authorLeo Yan <leo.yan@linaro.org>
Wed, 15 Mar 2023 14:50:57 +0000 (22:50 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 15 Mar 2023 19:13:45 +0000 (16:13 -0300)
commit9c3aa1f41178d75c7eabfa818bc02b698b5f152e
tree5c55ccbccea4435416a246afb77c59ae158ea274
parentc46bf3bd00167e09729f884dd479b0a8d1a63f95
perf kvm: Refactor overall statistics

Currently the tool computes overall statistics when sort the results.
This patch refactors overall statistics during events processing,
therefore, the function update_total_coun() is not needed anymore, an
extra benefit is we can de-couple code between the statistics and the
sorting.

This patch is not expected any functionality changes.

Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kvm.c