perf list: Add support for PERF_COUNT_SW_BPF_OUT
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 27 Nov 2015 18:54:33 +0000 (15:54 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 16 Dec 2015 19:43:10 +0000 (16:43 -0300)
commitd643b5aba84884de96d2ea4a902f8b0d9cf4b1b0
tree970479af445079e1d4ab8a7abe702cfa05373ad6
parent03fba21adb190fc0aec9c2556639c1c1b195aee7
perf list: Add support for PERF_COUNT_SW_BPF_OUT

When PERF_COUNT_SW_BPF_OUTPUT was added to the kernel we should've
added it to tools/perf, where it is used just to list events.

This ended up causing a segfault in commands like "perf list stall".

Fix it by adding that new software counter.

A patch to robustify perf to not segfault when the next counter gets
added in the kernel will follow this one.

Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-uya354upi3eprsey6mi5962d@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.c