OSDN Git Service

perf jevents: Free the sys_event_tables list after processing entries
authorLike Xu <likexu@tencent.com>
Tue, 28 Sep 2021 10:29:38 +0000 (18:29 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 Oct 2021 17:48:10 +0000 (14:48 -0300)
commitb94729919db2c6737501c36ea6526a36d5d63fa2
tree8660ba1ef06c6eb9911d0c7976f3a9d6e3986b69
parentf6274b06e326d8471cdfb52595f989a90f5e888f
perf jevents: Free the sys_event_tables list after processing entries

The compiler reports that free_sys_event_tables() is dead code.

But according to the semantics, the "LIST_HEAD(sys_event_tables)" should
also be released, just like we do with 'arch_std_events' in main().

Fixes: e9d32c1bf0cd7a98 ("perf vendor events: Add support for arch standard events")
Signed-off-by: Like Xu <likexu@tencent.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.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/20210928102938.69681-1-likexu@tencent.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/pmu-events/jevents.c