aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent/event-parse.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-04-05 18:47:57 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2012-04-25 07:35:18 -0400
commit4dc1024a7a529626de5a800b10088bcbbc1ae941 (patch)
tree53100c8ed8b599568cc6f1f023e1a709d3eeda1f /tools/lib/traceevent/event-parse.h
parentaaf045f72335653b24784d6042be8e4aee114403 (diff)
perf/events: Add flag to produce nsec output
libtraceevent library prints out in usecs but perf wants to print out in nsecs. Add a flag that lets the user decide to print out in usec or nsec times. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Arun Sharma <asharma@fb.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'tools/lib/traceevent/event-parse.h')
-rw-r--r--tools/lib/traceevent/event-parse.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 2e0222dd3a8b..88528278f9aa 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -334,6 +334,10 @@ enum pevent_func_arg_type {
334 PEVENT_FUNC_ARG_MAX_TYPES 334 PEVENT_FUNC_ARG_MAX_TYPES
335}; 335};
336 336
337enum pevent_flag {
338 PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */
339};
340
337struct cmdline; 341struct cmdline;
338struct cmdline_list; 342struct cmdline_list;
339struct func_map; 343struct func_map;
@@ -373,6 +377,7 @@ struct pevent {
373 struct printk_list *printklist; 377 struct printk_list *printklist;
374 unsigned int printk_count; 378 unsigned int printk_count;
375 379
380
376 struct event_format **events; 381 struct event_format **events;
377 int nr_events; 382 int nr_events;
378 struct event_format **sort_events; 383 struct event_format **sort_events;
@@ -397,6 +402,8 @@ struct pevent {
397 402
398 int test_filters; 403 int test_filters;
399 404
405 int flags;
406
400 struct format_field *bprint_ip_field; 407 struct format_field *bprint_ip_field;
401 struct format_field *bprint_fmt_field; 408 struct format_field *bprint_fmt_field;
402 struct format_field *bprint_buf_field; 409 struct format_field *bprint_buf_field;
@@ -408,6 +415,11 @@ struct pevent {
408 struct event_format *last_event; 415 struct event_format *last_event;
409}; 416};
410 417
418static inline void pevent_set_flag(struct pevent *pevent, int flag)
419{
420 pevent->flags |= flag;
421}
422
411static inline unsigned short 423static inline unsigned short
412__data2host2(struct pevent *pevent, unsigned short data) 424__data2host2(struct pevent *pevent, unsigned short data)
413{ 425{