• Steven Rostedt's avatar
    tracing/events: reuse trace event ids after overflow · 060fa5c8
    Steven Rostedt authored
    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: default avatarLi Zefan <lizf@cn.fujitsu.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>