summaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event.h
diff options
context:
space:
mode:
authorZe Gao <zegao2021@gmail.com>2024-01-23 02:02:11 -0500
committerNamhyung Kim <namhyung@kernel.org>2024-02-01 22:10:27 -0800
commit20018398fca87c914654252f7647a224e6b030ee (patch)
tree937fb12b62bf7009a0f4210c0e7e5313d291eeb3 /tools/perf/util/trace-event.h
parent7727d59de44e4568d0ad0f3867c8bdec69d688fe (diff)
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
Diffstat (limited to 'tools/perf/util/trace-event.h')
-rw-r--r--tools/perf/util/trace-event.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index a69ee29419f3..bbf8b26bc8da 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -15,6 +15,7 @@ struct perf_tool;
struct thread;
struct tep_plugin_list;
struct evsel;
+struct tep_format_field;
struct trace_event {
struct tep_handle *pevent;
@@ -51,6 +52,8 @@ int parse_event_file(struct tep_handle *pevent,
unsigned long long
raw_field_value(struct tep_event *event, const char *name, void *data);
+const char *parse_task_states(struct tep_format_field *state_field);
+
void parse_proc_kallsyms(struct tep_handle *pevent, char *file, unsigned int size);
void parse_ftrace_printk(struct tep_handle *pevent, char *file, unsigned int size);
void parse_saved_cmdline(struct tep_handle *pevent, char *file, unsigned int size);