Commit | Line | Data |
---|---|---|
4ace73ee SR |
1 | #ifndef _PERF_UTIL_TRACE_EVENT_H |
2 | #define _PERF_UTIL_TRACE_EVENT_H | |
52050943 | 3 | |
1ef2ed10 | 4 | #include "parse-events.h" |
4ace73ee SR |
5 | #include "trace-parse-events.h" |
6 | #include "session.h" | |
743eb868 ACM |
7 | |
8 | struct machine; | |
9 | struct perf_sample; | |
10 | union perf_event; | |
11 | struct thread; | |
52050943 | 12 | |
69aad6f1 | 13 | int read_tracing_data(int fd, struct list_head *pattrs); |
29208e57 JO |
14 | |
15 | struct tracing_data { | |
16 | /* size is only valid if temp is 'true' */ | |
17 | ssize_t size; | |
18 | bool temp; | |
19 | char temp_file[50]; | |
20 | }; | |
21 | ||
22 | struct tracing_data *tracing_data_get(struct list_head *pattrs, | |
23 | int fd, bool temp); | |
24 | void tracing_data_put(struct tracing_data *tdata); | |
25 | ||
52050943 | 26 | |
956ffd02 TZ |
27 | struct scripting_ops { |
28 | const char *name; | |
586bc5cc | 29 | int (*start_script) (const char *script, int argc, const char **argv); |
956ffd02 | 30 | int (*stop_script) (void); |
be6d842a DA |
31 | void (*process_event) (union perf_event *event, |
32 | struct perf_sample *sample, | |
9e69c210 | 33 | struct perf_evsel *evsel, |
743eb868 | 34 | struct machine *machine, |
be6d842a | 35 | struct thread *thread); |
956ffd02 TZ |
36 | int (*generate_script) (const char *outfile); |
37 | }; | |
38 | ||
39 | int script_spec_register(const char *spec, struct scripting_ops *ops); | |
40 | ||
16c632de | 41 | void setup_perl_scripting(void); |
7e4b21b8 | 42 | void setup_python_scripting(void); |
16c632de | 43 | |
7397d80d TZ |
44 | struct scripting_context { |
45 | void *event_data; | |
46 | }; | |
47 | ||
48 | int common_pc(struct scripting_context *context); | |
49 | int common_flags(struct scripting_context *context); | |
50 | int common_lock_depth(struct scripting_context *context); | |
51 | ||
4ace73ee | 52 | #endif /* _PERF_UTIL_TRACE_EVENT_H */ |