summaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-11-11 02:07:30 +0000
committerPeter Zijlstra <peterz@infradead.org>2021-11-17 14:49:09 +0100
commit87b940a0675e25261f022ac3e53e0dfff9cdb995 (patch)
treedd444ca4e1ac34f6e0bf0b46317c9f24f666b279 /lib/debugobjects.c
parent2aef6f306b39bbe74e2287d6e2ee07c4867d87d0 (diff)
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
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions