From 36f9ea18b58d7db2714651f324d95e841a8ef41c Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 18 Dec 2009 10:52:15 -0500 Subject: trace-cmd: Pass in record to pevent functions Instead of passing in the data, size and timestamp to the pevent parsing routines, pass in the record itself. This allows the pevent parsing routines to have a bit more control and facilitates the need of future work where we need to know more about the record in the parser. Signed-off-by: Steven Rostedt --- plugin_hrtimer.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'plugin_hrtimer.c') diff --git a/plugin_hrtimer.c b/plugin_hrtimer.c index 01f8ff3..2833f1b 100644 --- a/plugin_hrtimer.c +++ b/plugin_hrtimer.c @@ -30,10 +30,11 @@ static void print_field(struct trace_seq *s, const char *fmt, trace_seq_printf(s, "CAN'T FIND FIELD \"%s\"", name); } -static int timer_expire_handler(struct trace_seq *s, void *data, int size, - struct event_format *event, int cpu, - unsigned long long nsecs) +static int timer_expire_handler(struct trace_seq *s, struct record *record, + struct event_format *event, int cpu) { + void *data = record->data; + trace_seq_printf(s, "hrtimer="); if (_print_field(s, "0x%llx", event, "timer", data) == -1) @@ -46,12 +47,12 @@ static int timer_expire_handler(struct trace_seq *s, void *data, int size, return 0; } -static int timer_start_handler(struct trace_seq *s, void *data, int size, - struct event_format *event, int cpu, - unsigned long long nsecs) +static int timer_start_handler(struct trace_seq *s, struct record *record, + struct event_format *event, int cpu) { struct pevent *pevent = event->pevent; struct format_field *fn = pevent_find_field(event, "function"); + void *data = record->data; trace_seq_printf(s, "hrtimer="); -- cgit v1.2.2 From 91dc34ce6bb3cc86d1e522c61bffaee6bc6bf23d Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 18 Dec 2009 11:54:28 -0500 Subject: trace-cmd/pevent: Remove passing of cpu to pevent prasing functions Now that the struct record holds the cpu information, there's no need to pass the cpu number to the pevent parsing routines. Signed-off-by: Steven Rostedt --- plugin_hrtimer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugin_hrtimer.c') diff --git a/plugin_hrtimer.c b/plugin_hrtimer.c index 2833f1b..afc5afe 100644 --- a/plugin_hrtimer.c +++ b/plugin_hrtimer.c @@ -31,7 +31,7 @@ static void print_field(struct trace_seq *s, const char *fmt, } static int timer_expire_handler(struct trace_seq *s, struct record *record, - struct event_format *event, int cpu) + struct event_format *event) { void *data = record->data; @@ -48,7 +48,7 @@ static int timer_expire_handler(struct trace_seq *s, struct record *record, } static int timer_start_handler(struct trace_seq *s, struct record *record, - struct event_format *event, int cpu) + struct event_format *event) { struct pevent *pevent = event->pevent; struct format_field *fn = pevent_find_field(event, "function"); -- cgit v1.2.2