OSDN Git Service

perf pmu: Add perf_pmu__destroy() function
authorNamhyung Kim <namhyung@kernel.org>
Fri, 31 Mar 2023 20:29:43 +0000 (13:29 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Apr 2023 16:23:58 +0000 (13:23 -0300)
commiteec1131091c88e5e72cb012a2e3b3789fbb53c15
tree5b84e7c2e3eaac1562bf5f895545d527e1a44b90
parent66c9598bd8916c6c1319d0100ac916cac89d4b0e
perf pmu: Add perf_pmu__destroy() function

It seems there's no function to delete the perf pmu struct.  Add the
perf_pmu__destroy() to do the job.  While at it, add some more helper
functions to delete pmu aliases and caps.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/pmu.c
tools/perf/util/pmu.h