perf/core: Fix event_function_local()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 16 Aug 2016 11:33:26 +0000 (13:33 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 18 Aug 2016 08:35:49 +0000 (10:35 +0200)
commitcca2094605efe6ccf43ff2876dd5bccc799202d8
tree602620076d8e75ee2cf71154fbafe6243caa405f
parent6c4687cc17a788a6dd8de3e27dbeabb7cbd3e066
perf/core: Fix event_function_local()

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: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter 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>
Cc: stable@vger.kernel.org # 4.5+
Fixes: fae3fde65138 ("perf: Collapse and fix event_function_call() users")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c