• S
    tracing: Only clear trace buffer on module unload if event was traced · 575380da
    Steven Rostedt (Red Hat) 提交于
    Currently, when a module with events is unloaded, the trace buffer is
    cleared. This is just a safety net in case the module might have some
    strange callback when its event is outputted. But there's no reason
    to reset the buffer if the module didn't have any of its events traced.
    
    Add a flag to the event "call" structure called WAS_ENABLED and gets set
    when the event is ever enabled, and this flag never gets cleared. When a
    module gets unloaded, if any of its events have this flag set, then the
    trace buffer will get cleared.
    Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
    575380da
ftrace_event.h 10.4 KB