perf stat: Pass fewer metric arguments
authorIan Rogers <irogers@google.com>
Wed, 21 Feb 2024 07:07:52 +0000 (23:07 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 22 Feb 2024 16:56:45 +0000 (08:56 -0800)
commiteee41e6b287e2adfefbe3b6fc80c66097c076f89
treefefee92039e8a9f9bb6c9b3ba9b9db177e6ce340
parent659663f0bccce884059985d5e43e066419cda4e2
perf stat: Pass fewer metric arguments

Pass metric_expr and evsel rather than specific variables from the
struct, thereby reducing the number of arguments. This will enable
later fixes.

To reduce the size of the diff, local variables are added to match the
previous parameter names. This isn't done in the case of "name" as
evsel->name is more intention revealing. A whitespace issue is also
addressed.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Kaige Ye <ye@kaige.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240221070754.4163916-1-irogers@google.com
tools/perf/util/stat-shadow.c