diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-05-18 11:04:30 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-05-24 21:35:36 -0400 |
commit | fca5d5687c29b1214d20067691a6c64965e82c10 (patch) | |
tree | 6a3ba105960cc2e717b9c43852a471cfc633a01a | |
parent | 30cd6e6b43aa5ae667567f7645d1eb4efc9ae875 (diff) |
trace-cmd: Fix reading of print strings
The code that cleaned up parsing the printk_format file never registered
the formats to the pevent code. Any trace_printk() that used bprint()
was not able to be parsed.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-cmd.h | 2 | ||||
-rw-r--r-- | trace-input.c | 2 | ||||
-rw-r--r-- | trace-util.c | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/trace-cmd.h b/trace-cmd.h index cc11cdf..643d394 100644 --- a/trace-cmd.h +++ b/trace-cmd.h | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | void parse_cmdlines(struct pevent *pevent, char *file, int size); | 27 | void parse_cmdlines(struct pevent *pevent, char *file, int size); |
28 | void parse_proc_kallsyms(struct pevent *pevent, char *file, unsigned int size); | 28 | void parse_proc_kallsyms(struct pevent *pevent, char *file, unsigned int size); |
29 | void parse_ftrace_printk(char *file, unsigned int size); | 29 | void parse_ftrace_printk(struct pevent *pevent, char *file, unsigned int size); |
30 | 30 | ||
31 | extern int tracecmd_disable_sys_plugins; | 31 | extern int tracecmd_disable_sys_plugins; |
32 | extern int tracecmd_disable_plugins; | 32 | extern int tracecmd_disable_plugins; |
diff --git a/trace-input.c b/trace-input.c index 9b0e509..c39004a 100644 --- a/trace-input.c +++ b/trace-input.c | |||
@@ -440,7 +440,7 @@ static int read_ftrace_printk(struct tracecmd_input *handle) | |||
440 | return -1; | 440 | return -1; |
441 | } | 441 | } |
442 | 442 | ||
443 | parse_ftrace_printk(buf, size); | 443 | parse_ftrace_printk(handle->pevent, buf, size); |
444 | 444 | ||
445 | free(buf); | 445 | free(buf); |
446 | 446 | ||
diff --git a/trace-util.c b/trace-util.c index 7f6f0bb..7c0481a 100644 --- a/trace-util.c +++ b/trace-util.c | |||
@@ -171,7 +171,8 @@ void parse_proc_kallsyms(struct pevent *pevent, | |||
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | void parse_ftrace_printk(char *file, unsigned int size __unused) | 174 | void parse_ftrace_printk(struct pevent *pevent, |
175 | char *file, unsigned int size __unused) | ||
175 | { | 176 | { |
176 | unsigned long long addr; | 177 | unsigned long long addr; |
177 | char *printk; | 178 | char *printk; |
@@ -191,6 +192,7 @@ void parse_ftrace_printk(char *file, unsigned int size __unused) | |||
191 | /* fmt still has a space, skip it */ | 192 | /* fmt still has a space, skip it */ |
192 | printk = strdup(fmt+1); | 193 | printk = strdup(fmt+1); |
193 | line = strtok_r(NULL, "\n", &next); | 194 | line = strtok_r(NULL, "\n", &next); |
195 | pevent_register_print_string(pevent, printk, addr); | ||
194 | } | 196 | } |
195 | } | 197 | } |
196 | 198 | ||