perf evsel: Rename get_states() to parse_task_states() and make it public
authorZe Gao <zegao2021@gmail.com>
Tue, 23 Jan 2024 07:02:11 +0000 (02:02 -0500)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 2 Feb 2024 06:10:27 +0000 (22:10 -0800)
commit20018398fca87c914654252f7647a224e6b030ee
tree937fb12b62bf7009a0f4210c0e7e5313d291eeb3
parent7727d59de44e4568d0ad0f3867c8bdec69d688fe
perf evsel: Rename get_states() to parse_task_states() and make it public

Since get_states() assumes the existence of libtraceevent, so move
to where it should belong, i.e, util/trace-event-parse.c, and also
rename it to parse_task_states().

Leave evsel_getstate() untouched as it fits well in the evsel
category.

Also make some necessary tweaks for python support, and get it
verified with: perf test python.

Signed-off-by: Ze Gao <zegao@tencent.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240123070210.1669843-2-zegao@tencent.com
tools/perf/Makefile.perf
tools/perf/util/evsel.c
tools/perf/util/python-ext-sources
tools/perf/util/setup.py
tools/perf/util/trace-event-parse.c
tools/perf/util/trace-event.h