• Peter Zijlstra's avatar
    perf/core: Fix event_function_local() · a5193d39
    Peter Zijlstra authored
    commit cca20946 upstream.
    
    Vincent reported triggering the WARN_ON_ONCE() in event_function_local().
    
    While thinking through cases I noticed that by using event_function()
    directly, we miss the inactive case usually handled by
    event_function_call().
    
    Therefore construct a blend of event_function_call() and
    event_function() that handles the cases relevant to
    event_function_local().
    Reported-by: default avatarVince Weaver <vincent.weaver@maine.edu>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Fixes: fae3fde6 ("perf: Collapse and fix event_function_call() users")
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    a5193d39
core.c 246 KB