]> git.karo-electronics.de Git - linux-beck.git/commit
tracing/events: make struct trace_entry->type to be int type
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 22 Apr 2009 08:53:34 +0000 (16:53 +0800)
committerIngo Molnar <mingo@elte.hu>
Wed, 22 Apr 2009 09:36:38 +0000 (11:36 +0200)
commit7a4f453b6d7379a7c380825949977c5a838aa012
tree9f5450c7a1abc865b998885affe964d4670a08bc
parent3554228d4289098a8fe5cfd87512ec32a19bbe5a
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>
include/linux/ftrace_event.h
include/trace/ftrace.h
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_events.c