diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-04-22 04:53:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-22 05:36:38 -0400 |
commit | 7a4f453b6d7379a7c380825949977c5a838aa012 (patch) | |
tree | 9f5450c7a1abc865b998885affe964d4670a08bc /include/linux/ftrace_event.h | |
parent | 3554228d4289098a8fe5cfd87512ec32a19bbe5a (diff) |
tracing/events: make struct trace_entry->type to be int type
struct trace_entry->type is unsigned char, while trace event's id is
int type, thus for a event with id >= 256, it's entry->type is cast
to (id % 256), and then we can't see the trace output of this event.
# insmod trace-events-sample.ko
# echo foo_bar > /mnt/tracing/set_event
# cat /debug/tracing/events/trace-events-sample/foo_bar/id
256
# cat /mnt/tracing/trace_pipe
<...>-3548 [001] 215.091142: Unknown type 0
<...>-3548 [001] 216.089207: Unknown type 0
<...>-3548 [001] 217.087271: Unknown type 0
<...>-3548 [001] 218.085332: Unknown type 0
[ Impact: fix output for trace events with id >= 256 ]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <49EEDB0E.5070207@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ftrace_event.h')
-rw-r--r-- | include/linux/ftrace_event.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 75f3ac01a87c..2a4a40749911 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -16,7 +16,7 @@ struct dentry; | |||
16 | * bash-15816 [01] 235.197585: idle_cpu <- irq_enter | 16 | * bash-15816 [01] 235.197585: idle_cpu <- irq_enter |
17 | */ | 17 | */ |
18 | struct trace_entry { | 18 | struct trace_entry { |
19 | unsigned char type; | 19 | int type; |
20 | unsigned char flags; | 20 | unsigned char flags; |
21 | unsigned char preempt_count; | 21 | unsigned char preempt_count; |
22 | int pid; | 22 | int pid; |
@@ -73,7 +73,7 @@ enum print_line_t { | |||
73 | 73 | ||
74 | 74 | ||
75 | struct ring_buffer_event * | 75 | struct ring_buffer_event * |
76 | trace_current_buffer_lock_reserve(unsigned char type, unsigned long len, | 76 | trace_current_buffer_lock_reserve(int type, unsigned long len, |
77 | unsigned long flags, int pc); | 77 | unsigned long flags, int pc); |
78 | void trace_current_buffer_unlock_commit(struct ring_buffer_event *event, | 78 | void trace_current_buffer_unlock_commit(struct ring_buffer_event *event, |
79 | unsigned long flags, int pc); | 79 | unsigned long flags, int pc); |