diff options
author | Like Xu <like.xu@linux.intel.com> | 2021-11-11 02:07:27 +0000 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-11-17 14:49:07 +0100 |
commit | b9f5621c9547dd787900f005a9e1c3d5712de512 (patch) | |
tree | db92d35feaaacd204506fa4cb5e32c2566a88b7f /arch/nios2 | |
parent | 84af21d850ee1ccc990df37dd47c13fdfe93be75 (diff) | |
download | lwn-b9f5621c9547dd787900f005a9e1c3d5712de512.tar.gz lwn-b9f5621c9547dd787900f005a9e1c3d5712de512.zip |
perf/core: Rework guest callbacks to prepare for static_call support
To prepare for using static_calls to optimize perf's guest callbacks,
replace ->is_in_guest and ->is_user_mode with a new multiplexed hook
->state, tweak ->handle_intel_pt_intr to play nice with being called when
there is no active guest, and drop "guest" from ->get_guest_ip.
Return '0' from ->state and ->handle_intel_pt_intr to indicate "not in
guest" so that DEFINE_STATIC_CALL_RET0 can be used to define the static
calls, i.e. no callback == !guest.
[sean: extracted from static_call patch, fixed get_ip() bug, wrote changelog]
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Originally-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20211111020738.2512932-7-seanjc@google.com
Diffstat (limited to 'arch/nios2')
0 files changed, 0 insertions, 0 deletions