perf trace-event-info: Add tracepoint_id_to_name() helper
authorYang Jihong <yangjihong1@huawei.com>
Fri, 23 Jun 2023 05:44:13 +0000 (05:44 +0000)
committerNamhyung Kim <namhyung@kernel.org>
Sat, 24 Jun 2023 05:30:16 +0000 (22:30 -0700)
commit220f88b5a11a88539fbc44d2740c41bf995ecb45
treed5394fc89ab141ecbef2d5844b2d178eae9c9f98
parentd82257d7f604ba6e714c9f1087a6dc599ccb1879
perf trace-event-info: Add tracepoint_id_to_name() helper

Add tracepoint_id_to_name() helper to search for the trace events directory
by given event id and return the corresponding tracepoint.

Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: anshuman.khandual@arm.com
Cc: mark.rutland@arm.com
Cc: irogers@google.com
Cc: jesussanp@google.com
Cc: peterz@infradead.org
Cc: acme@kernel.org
Cc: jolsa@kernel.org
Cc: alexander.shishkin@linux.intel.com
Cc: mingo@redhat.com
Link: https://lore.kernel.org/r/20230623054416.160858-2-yangjihong1@huawei.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/trace-event-info.c
tools/perf/util/trace-event.h