diff options
Diffstat (limited to 'tools/perf/util/trace-event.h')
-rw-r--r-- | tools/perf/util/trace-event.h | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h index 639852ac1117..8fef1d6687b7 100644 --- a/tools/perf/util/trace-event.h +++ b/tools/perf/util/trace-event.h | |||
@@ -8,6 +8,7 @@ | |||
8 | struct machine; | 8 | struct machine; |
9 | struct perf_sample; | 9 | struct perf_sample; |
10 | union perf_event; | 10 | union perf_event; |
11 | struct perf_tool; | ||
11 | struct thread; | 12 | struct thread; |
12 | 13 | ||
13 | extern int header_page_size_size; | 14 | extern int header_page_size_size; |
@@ -29,35 +30,36 @@ enum { | |||
29 | 30 | ||
30 | int bigendian(void); | 31 | int bigendian(void); |
31 | 32 | ||
32 | int read_trace_init(int file_bigendian, int host_bigendian); | 33 | struct pevent *read_trace_init(int file_bigendian, int host_bigendian); |
33 | void print_trace_event(int cpu, void *data, int size); | 34 | void print_trace_event(struct pevent *pevent, int cpu, void *data, int size); |
34 | 35 | ||
35 | void print_event(int cpu, void *data, int size, unsigned long long nsecs, | 36 | void print_event(struct pevent *pevent, int cpu, void *data, int size, |
36 | char *comm); | 37 | unsigned long long nsecs, char *comm); |
37 | 38 | ||
38 | int parse_ftrace_file(char *buf, unsigned long size); | 39 | int parse_ftrace_file(struct pevent *pevent, char *buf, unsigned long size); |
39 | int parse_event_file(char *buf, unsigned long size, char *sys); | 40 | int parse_event_file(struct pevent *pevent, |
41 | char *buf, unsigned long size, char *sys); | ||
40 | 42 | ||
41 | struct pevent_record *trace_peek_data(int cpu); | 43 | struct pevent_record *trace_peek_data(struct pevent *pevent, int cpu); |
42 | struct event_format *trace_find_event(int type); | ||
43 | 44 | ||
44 | unsigned long long | 45 | unsigned long long |
45 | raw_field_value(struct event_format *event, const char *name, void *data); | 46 | raw_field_value(struct event_format *event, const char *name, void *data); |
46 | void *raw_field_ptr(struct event_format *event, const char *name, void *data); | 47 | void *raw_field_ptr(struct event_format *event, const char *name, void *data); |
47 | 48 | ||
48 | void parse_proc_kallsyms(char *file, unsigned int size __unused); | 49 | void parse_proc_kallsyms(struct pevent *pevent, char *file, unsigned int size); |
49 | void parse_ftrace_printk(char *file, unsigned int size __unused); | 50 | void parse_ftrace_printk(struct pevent *pevent, char *file, unsigned int size); |
50 | 51 | ||
51 | ssize_t trace_report(int fd, bool repipe); | 52 | ssize_t trace_report(int fd, struct pevent **pevent, bool repipe); |
52 | 53 | ||
53 | int trace_parse_common_type(void *data); | 54 | int trace_parse_common_type(struct pevent *pevent, void *data); |
54 | int trace_parse_common_pid(void *data); | 55 | int trace_parse_common_pid(struct pevent *pevent, void *data); |
55 | 56 | ||
56 | struct event_format *trace_find_next_event(struct event_format *event); | 57 | struct event_format *trace_find_next_event(struct pevent *pevent, |
57 | unsigned long long read_size(void *ptr, int size); | 58 | struct event_format *event); |
59 | unsigned long long read_size(struct pevent *pevent, void *ptr, int size); | ||
58 | unsigned long long eval_flag(const char *flag); | 60 | unsigned long long eval_flag(const char *flag); |
59 | 61 | ||
60 | struct pevent_record *trace_read_data(int cpu); | 62 | struct pevent_record *trace_read_data(struct pevent *pevent, int cpu); |
61 | int read_tracing_data(int fd, struct list_head *pattrs); | 63 | int read_tracing_data(int fd, struct list_head *pattrs); |
62 | 64 | ||
63 | struct tracing_data { | 65 | struct tracing_data { |
@@ -77,11 +79,12 @@ struct scripting_ops { | |||
77 | int (*start_script) (const char *script, int argc, const char **argv); | 79 | int (*start_script) (const char *script, int argc, const char **argv); |
78 | int (*stop_script) (void); | 80 | int (*stop_script) (void); |
79 | void (*process_event) (union perf_event *event, | 81 | void (*process_event) (union perf_event *event, |
82 | struct pevent *pevent, | ||
80 | struct perf_sample *sample, | 83 | struct perf_sample *sample, |
81 | struct perf_evsel *evsel, | 84 | struct perf_evsel *evsel, |
82 | struct machine *machine, | 85 | struct machine *machine, |
83 | struct thread *thread); | 86 | struct thread *thread); |
84 | int (*generate_script) (const char *outfile); | 87 | int (*generate_script) (struct pevent *pevent, const char *outfile); |
85 | }; | 88 | }; |
86 | 89 | ||
87 | int script_spec_register(const char *spec, struct scripting_ops *ops); | 90 | int script_spec_register(const char *spec, struct scripting_ops *ops); |
@@ -90,6 +93,7 @@ void setup_perl_scripting(void); | |||
90 | void setup_python_scripting(void); | 93 | void setup_python_scripting(void); |
91 | 94 | ||
92 | struct scripting_context { | 95 | struct scripting_context { |
96 | struct pevent *pevent; | ||
93 | void *event_data; | 97 | void *event_data; |
94 | }; | 98 | }; |
95 | 99 | ||