perf pmu: Remove str from perf_pmu_alias
authorIan Rogers <irogers@google.com>
Wed, 30 Aug 2023 07:07:53 +0000 (00:07 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 31 Aug 2023 02:03:03 +0000 (23:03 -0300)
commit30f0b435bbf2b83cf822dbe40d23b41bdcae7156
tree91ac890ec60e16d726d24a9f34f4e83cdde8239c
parent7a6e91644708d514082a00fce3cd509960935fb8
perf pmu: Remove str from perf_pmu_alias

Currently the value is only used in perf list.

Compute the value just when needed to avoid unnecessary overhead.

Recycle the strbuf to avoid memory allocation overhead.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20230830070753.1821629-3-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/pmu.c