diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-04-05 18:47:57 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2012-04-25 07:35:18 -0400 |
commit | 4dc1024a7a529626de5a800b10088bcbbc1ae941 (patch) | |
tree | 53100c8ed8b599568cc6f1f023e1a709d3eeda1f /tools/lib/traceevent/event-parse.h | |
parent | aaf045f72335653b24784d6042be8e4aee114403 (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.h | 12 |
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 | ||
337 | enum pevent_flag { | ||
338 | PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */ | ||
339 | }; | ||
340 | |||
337 | struct cmdline; | 341 | struct cmdline; |
338 | struct cmdline_list; | 342 | struct cmdline_list; |
339 | struct func_map; | 343 | struct 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 | ||
418 | static inline void pevent_set_flag(struct pevent *pevent, int flag) | ||
419 | { | ||
420 | pevent->flags |= flag; | ||
421 | } | ||
422 | |||
411 | static inline unsigned short | 423 | static inline unsigned short |
412 | __data2host2(struct pevent *pevent, unsigned short data) | 424 | __data2host2(struct pevent *pevent, unsigned short data) |
413 | { | 425 | { |