bpftool: Add perf event names
authorYafang Shao <laoar.shao@gmail.com>
Sun, 9 Jul 2023 02:56:29 +0000 (02:56 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 12 Jul 2023 03:07:51 +0000 (20:07 -0700)
commit62b57e3ddd64002f5b3f6fb2ea50b79a2994cfec
treeed826b22ca972f64ee0a169183534d79acdd5ff5
parent1b715e1b0ec531fae72cd6698fe1c98affa436f8
bpftool: Add perf event names

Add new functions and macros to get perf event names. These names except
the perf_type_name are all copied from
tool/perf/util/{parse-events,evsel}.c, so that in the future we will
have a good chance to use the same code.

Suggested-by: Jiri Olsa <olsajiri@gmail.com>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230709025630.3735-10-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/link.c