summaryrefslogtreecommitdiff
path: root/tools/perf/util/pmu.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2023-03-31 13:29:43 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-04-04 13:23:58 -0300
commiteec1131091c88e5e72cb012a2e3b3789fbb53c15 (patch)
tree5b84e7c2e3eaac1562bf5f895545d527e1a44b90 /tools/perf/util/pmu.h
parent66c9598bd8916c6c1319d0100ac916cac89d4b0e (diff)
downloadlwn-eec1131091c88e5e72cb012a2e3b3789fbb53c15.tar.gz
lwn-eec1131091c88e5e72cb012a2e3b3789fbb53c15.zip
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>
Diffstat (limited to 'tools/perf/util/pmu.h')
-rw-r--r--tools/perf/util/pmu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 24cf69ab32cd..72fd5de334c0 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -259,4 +259,6 @@ int perf_pmu__pathname_scnprintf(char *buf, size_t size,
const char *pmu_name, const char *filename);
FILE *perf_pmu__open_file(struct perf_pmu *pmu, const char *name);
+void perf_pmu__destroy(void);
+
#endif /* __PMU_H */