Commit 27746018 authored by Tom Zanussi's avatar Tom Zanussi Committed by Ingo Molnar

perf trace: Add subsystem string to struct event

Needed to fully qualify event names for event stream processing.
Signed-off-by: default avatarTom Zanussi <tzanussi@gmail.com>
Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org
Cc: lizf@cn.fujitsu.com
Cc: hch@infradead.org
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1254809398-8078-3-git-send-email-tzanussi@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 26a50744
...@@ -2950,7 +2950,7 @@ int parse_ftrace_file(char *buf, unsigned long size) ...@@ -2950,7 +2950,7 @@ int parse_ftrace_file(char *buf, unsigned long size)
return 0; return 0;
} }
int parse_event_file(char *buf, unsigned long size, char *system__unused __unused) int parse_event_file(char *buf, unsigned long size, char *sys)
{ {
struct event *event; struct event *event;
int ret; int ret;
...@@ -2977,6 +2977,8 @@ int parse_event_file(char *buf, unsigned long size, char *system__unused __unuse ...@@ -2977,6 +2977,8 @@ int parse_event_file(char *buf, unsigned long size, char *system__unused __unuse
if (ret < 0) if (ret < 0)
die("failed to read event print fmt"); die("failed to read event print fmt");
event->system = strdup(sys);
#define PRINT_ARGS 0 #define PRINT_ARGS 0
if (PRINT_ARGS && event->print_fmt.args) if (PRINT_ARGS && event->print_fmt.args)
print_args(event->print_fmt.args); print_args(event->print_fmt.args);
......
...@@ -133,6 +133,7 @@ struct event { ...@@ -133,6 +133,7 @@ struct event {
int flags; int flags;
struct format format; struct format format;
struct print_fmt print_fmt; struct print_fmt print_fmt;
char *system;
}; };
enum { enum {
...@@ -167,7 +168,7 @@ void print_funcs(void); ...@@ -167,7 +168,7 @@ void print_funcs(void);
void print_printk(void); void print_printk(void);
int parse_ftrace_file(char *buf, unsigned long size); int parse_ftrace_file(char *buf, unsigned long size);
int parse_event_file(char *buf, unsigned long size, char *system); int parse_event_file(char *buf, unsigned long size, char *sys);
void print_event(int cpu, void *data, int size, unsigned long long nsecs, void print_event(int cpu, void *data, int size, unsigned long long nsecs,
char *comm); char *comm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment