linux/kernel/events
Sean Christopherson 87b940a067 perf/core: Use static_call to optimize perf_guest_info_callbacks
Use static_call to optimize perf's guest callbacks on arm64 and x86,
which are now the only architectures that define the callbacks.  Use
DEFINE_STATIC_CALL_RET0 as the default/NULL for all guest callbacks, as
the callback semantics are that a return value '0' means "not in guest".

static_call obviously avoids the overhead of CONFIG_RETPOLINE=y, but is
also advantageous versus other solutions, e.g. per-cpu callbacks, in that
a per-cpu memory load is not needed to detect the !guest case.

Based on code from Peter and Like.

Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20211111020738.2512932-10-seanjc@google.com
2021-11-17 14:49:09 +01:00
..
callchain.c uaccess: add force_uaccess_{begin,end} helpers 2020-08-12 10:57:59 -07:00
core.c perf/core: Use static_call to optimize perf_guest_info_callbacks 2021-11-17 14:49:09 +01:00
hw_breakpoint.c perf/hw_breakpoint: Replace deprecated CPU-hotplug functions 2021-08-26 09:14:36 +02:00
internal.h tracing/perf: Add interrupt_context_level() helper 2021-10-19 20:33:20 -04:00
Makefile perf/core: allow ftrace for functions in kernel/event/core.c 2021-10-25 22:50:42 -04:00
ring_buffer.c perf: Cap allocation order at aux_watermark 2021-04-16 16:32:39 +02:00
uprobes.c mm/memcg: Convert mem_cgroup_charge() to take a folio 2021-09-27 09:27:31 -04:00