aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/trace-event.h')
-rw-r--r--tools/perf/util/trace-event.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index dd51c6872a15..81698d5e6503 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -29,6 +29,8 @@ enum format_flags {
29 FIELD_IS_SIGNED = 4, 29 FIELD_IS_SIGNED = 4,
30 FIELD_IS_STRING = 8, 30 FIELD_IS_STRING = 8,
31 FIELD_IS_DYNAMIC = 16, 31 FIELD_IS_DYNAMIC = 16,
32 FIELD_IS_FLAG = 32,
33 FIELD_IS_SYMBOLIC = 64,
32}; 34};
33 35
34struct format_field { 36struct format_field {
@@ -243,10 +245,17 @@ extern int latency_format;
243 245
244int parse_header_page(char *buf, unsigned long size); 246int parse_header_page(char *buf, unsigned long size);
245int trace_parse_common_type(void *data); 247int trace_parse_common_type(void *data);
248int trace_parse_common_pid(void *data);
249int parse_common_pc(void *data);
250int parse_common_flags(void *data);
251int parse_common_lock_depth(void *data);
246struct event *trace_find_event(int id); 252struct event *trace_find_event(int id);
253struct event *trace_find_next_event(struct event *event);
254unsigned long long read_size(void *ptr, int size);
247unsigned long long 255unsigned long long
248raw_field_value(struct event *event, const char *name, void *data); 256raw_field_value(struct event *event, const char *name, void *data);
249void *raw_field_ptr(struct event *event, const char *name, void *data); 257void *raw_field_ptr(struct event *event, const char *name, void *data);
258unsigned long long eval_flag(const char *flag);
250 259
251int read_tracing_data(int fd, struct perf_event_attr *pattrs, int nb_events); 260int read_tracing_data(int fd, struct perf_event_attr *pattrs, int nb_events);
252 261
@@ -259,4 +268,18 @@ enum trace_flag_type {
259 TRACE_FLAG_SOFTIRQ = 0x10, 268 TRACE_FLAG_SOFTIRQ = 0x10,
260}; 269};
261 270
271struct scripting_ops {
272 const char *name;
273 int (*start_script) (const char *);
274 int (*stop_script) (void);
275 void (*process_event) (int cpu, void *data, int size,
276 unsigned long long nsecs, char *comm);
277 int (*generate_script) (const char *outfile);
278};
279
280int script_spec_register(const char *spec, struct scripting_ops *ops);
281
282extern struct scripting_ops perl_scripting_ops;
283void setup_perl_scripting(void);
284
262#endif /* __PERF_TRACE_EVENTS_H */ 285#endif /* __PERF_TRACE_EVENTS_H */