aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/traceevent/event-parse.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-04-06 00:47:57 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2012-04-25 13:35:18 +0200
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 2e0222dd3a8..88528278f9a 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -334,6 +334,10 @@ enum pevent_func_arg_type {
PEVENT_FUNC_ARG_MAX_TYPES
};
+enum pevent_flag {
+ PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */
+};
+
struct cmdline;
struct cmdline_list;
struct func_map;
@@ -373,6 +377,7 @@ struct pevent {
struct printk_list *printklist;
unsigned int printk_count;
+
struct event_format **events;
int nr_events;
struct event_format **sort_events;
@@ -397,6 +402,8 @@ struct pevent {
int test_filters;
+ int flags;
+
struct format_field *bprint_ip_field;
struct format_field *bprint_fmt_field;
struct format_field *bprint_buf_field;
@@ -408,6 +415,11 @@ struct pevent {
struct event_format *last_event;
};
+static inline void pevent_set_flag(struct pevent *pevent, int flag)
+{
+ pevent->flags |= flag;
+}
+
static inline unsigned short
__data2host2(struct pevent *pevent, unsigned short data)
{