events: Update tools/lib/traceevent to work with perf
[deliverable/linux.git] / tools / perf / util / trace-event.h
CommitLineData
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
8struct machine;
9struct perf_sample;
10union perf_event;
11struct thread;
52050943 12
69aad6f1 13int read_tracing_data(int fd, struct list_head *pattrs);
29208e57
JO
14
15struct 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
22struct tracing_data *tracing_data_get(struct list_head *pattrs,
23 int fd, bool temp);
24void tracing_data_put(struct tracing_data *tdata);
25
52050943 26
956ffd02
TZ
27struct 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
39int script_spec_register(const char *spec, struct scripting_ops *ops);
40
16c632de 41void setup_perl_scripting(void);
7e4b21b8 42void setup_python_scripting(void);
16c632de 43
7397d80d
TZ
44struct scripting_context {
45 void *event_data;
46};
47
48int common_pc(struct scripting_context *context);
49int common_flags(struct scripting_context *context);
50int common_lock_depth(struct scripting_context *context);
51
4ace73ee 52#endif /* _PERF_UTIL_TRACE_EVENT_H */
This page took 0.118946 seconds and 5 git commands to generate.