• Steven Rostedt (Red Hat)'s avatar
    tracing: Fix trace events build without modules · 315326c1
    Steven Rostedt (Red Hat) authored
    The new multi-buffers added a descriptor that kept track of module
    events, and the directories they use, with struct ftace_module_file_ops.
    This is used to add a ref count to keep modules from unloading while
    their files are being accessed.
    
    As the descriptor is only needed when CONFIG_MODULES is enabled, it
    is only declared when the config is enabled. But that struct is
    dereferenced in a few areas outside the #ifdef CONFIG_MODULES.
    
    By adding some helper routines and moving code around a little,
    events can be compiled again without modules.
    Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    315326c1
trace_events.c 49.8 KB