Skip to content
  • Steven Rostedt (Red Hat)'s avatar
    tracing: Only clear trace buffer on module unload if event was traced · 575380da
    Steven Rostedt (Red Hat) authored
    
    
    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: default avatarSteven Rostedt <rostedt@goodmis.org>
    575380da