perf list: Fix JSON segfault by setting the used skip_duplicate_pmus callback
authorIan Rogers <irogers@google.com>
Wed, 29 Nov 2023 21:34:26 +0000 (13:34 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:45:34 +0000 (18:45 +0100)
commit1f4d4d2cd6b5ac6bb2d97c8f8bc0f366579ee692
tree333c2b4403b9123ac26565ed9f57600f14173ef0
parentdea8cfe773b967466590568da0f020ccf41453f8
perf list: Fix JSON segfault by setting the used skip_duplicate_pmus callback

commit b1693747487442984050eb0f462b83a3a8307525 upstream.

Json output didn't set the skip_duplicate_pmus callback yielding a
segfault.

Fixes: cd4e1efbbc40 ("perf pmus: Skip duplicate PMUs and don't print list suffix by default")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com
[namhyung: updated subject line according to Arnaldo]
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/perf/builtin-list.c