aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/trace-event-parse.c4
-rw-r--r--tools/perf/util/trace-event.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index be8412d699a1..de3fc8bf8bfe 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -2950,7 +2950,7 @@ int parse_ftrace_file(char *buf, unsigned long size)
2950 return 0; 2950 return 0;
2951} 2951}
2952 2952
2953int parse_event_file(char *buf, unsigned long size, char *system__unused __unused) 2953int parse_event_file(char *buf, unsigned long size, char *sys)
2954{ 2954{
2955 struct event *event; 2955 struct event *event;
2956 int ret; 2956 int ret;
@@ -2977,6 +2977,8 @@ int parse_event_file(char *buf, unsigned long size, char *system__unused __unuse
2977 if (ret < 0) 2977 if (ret < 0)
2978 die("failed to read event print fmt"); 2978 die("failed to read event print fmt");
2979 2979
2980 event->system = strdup(sys);
2981
2980#define PRINT_ARGS 0 2982#define PRINT_ARGS 0
2981 if (PRINT_ARGS && event->print_fmt.args) 2983 if (PRINT_ARGS && event->print_fmt.args)
2982 print_args(event->print_fmt.args); 2984 print_args(event->print_fmt.args);
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index 00b440df66d8..cb92978be300 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -133,6 +133,7 @@ struct event {
133 int flags; 133 int flags;
134 struct format format; 134 struct format format;
135 struct print_fmt print_fmt; 135 struct print_fmt print_fmt;
136 char *system;
136}; 137};
137 138
138enum { 139enum {
@@ -167,7 +168,7 @@ void print_funcs(void);
167void print_printk(void); 168void print_printk(void);
168 169
169int parse_ftrace_file(char *buf, unsigned long size); 170int parse_ftrace_file(char *buf, unsigned long size);
170int parse_event_file(char *buf, unsigned long size, char *system); 171int parse_event_file(char *buf, unsigned long size, char *sys);
171void print_event(int cpu, void *data, int size, unsigned long long nsecs, 172void print_event(int cpu, void *data, int size, unsigned long long nsecs,
172 char *comm); 173 char *comm);
173 174