diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-04-24 12:20:52 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-04-24 23:06:00 -0400 |
commit | 060fa5c83e67901ba47ab484cfcdb32737d630ba (patch) | |
tree | c83ec27ae1064cfb290904f95cb85b3b0889b2a1 /include | |
parent | b8e65554d80b4c560d201362d0e8fa02109d89fd (diff) | |
download | linux-060fa5c83e67901ba47ab484cfcdb32737d630ba.tar.gz linux-060fa5c83e67901ba47ab484cfcdb32737d630ba.tar.bz2 linux-060fa5c83e67901ba47ab484cfcdb32737d630ba.zip |
tracing/events: reuse trace event ids after overflow
With modules being able to add trace events, and the max trace event
counter is 16 bits (65536) we can overflow the counter easily
with a simple while loop adding and removing modules that contain
trace events.
This patch links together the registered trace events and on overflow
searches for available trace event ids. It will still fail if
over 65536 events are registered, but considering that a typical
kernel only has 22000 functions, 65000 events should be sufficient.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace_event.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 07e0a6d64a24..78a9ba24cbf6 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h @@ -56,6 +56,7 @@ typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter, int flags); struct trace_event { struct hlist_node node; + struct list_head list; int type; trace_print_func trace; trace_print_func raw; |