still
misattribute a PMI that arrived in the host as a guest event depending
on KVM arch and vendor behavior.
Signed-off-by: Colton Lewis
Acked-by: Mark Rutland
Acked-by: Kan Liang
Reviewed-by: Oliver Upton
---
arch/arm64/include/asm/perf_event.h | 4
arch/arm64/kernel/perf_callchain.c
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
Acked-by: Kan Liang
Reviewed-by: Oliver Upton
---
arch/x86/events/core.c| 59 ++-
arch/x86/include
Make sure powerpc uses the arch-specific function now that those have
been reorganized.
Signed-off-by: Colton Lewis
Acked-by: Madhavan Srinivasan
Reviewed-by: Oliver Upton
---
arch/powerpc/perf/callchain.c| 2 +-
arch/powerpc/perf/callchain_32.c | 2 +-
arch/powerpc/perf/callchain_64.c
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off-by: Colton Lewis
Acked-by: Thomas Richter
Acked-by: Mark Rutland
For arm's implementation, perf_instruction_pointer() and
perf_misc_flags() are equivalent to the generic versions in
include/linux/perf_event.h so arch/arm doesn't need to provide its
own versions. Drop them here.
Signed-off-by: Colton Lewis
Acked-by: Will Deacon
Reviewed-by: Ol
llsyms][k] handle_mm_fault
0.74% dirty_log_perf_ [kernel.kallsyms] [k] mas_state_walk
Colton Lewis (5):
arm: perf: Drop unused functions
perf: Hoist perf_instruction_pointer() and perf_misc_flags()
powerpc: perf: Use perf_arch_instruction_pointer()
x86: perf: Refactor misc flag as
Colton Lewis writes:
Peter Zijlstra writes:
On Fri, Nov 08, 2024 at 08:20:44PM +0100, Peter Zijlstra wrote:
Isn't the below more or less what you want?
static unsigned long misc_flags(struct pt_regs *regs)
{
unsigned long flags = 0;
if (regs-&
Peter Zijlstra writes:
On Fri, Nov 08, 2024 at 08:20:44PM +0100, Peter Zijlstra wrote:
Isn't the below more or less what you want?
static unsigned long misc_flags(struct pt_regs *regs)
{
unsigned long flags = 0;
if (regs->flags & PERF_EFLAGS_EXACT)
flags
Peter Zijlstra writes:
On Thu, Nov 07, 2024 at 07:03:35PM +, Colton Lewis wrote:
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
Reviewed-by: Oliver Upton
---
arch/x86/events
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off-by: Colton Lewis
Acked-by: Thomas Richter
Acked-by: Mark Rutland
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
Reviewed-by: Oliver Upton
---
arch/x86/events/core.c| 32 +++
arch/x86/include/asm/perf_event.h | 2
For arm's implementation, perf_instruction_pointer() and
perf_misc_flags() are equivalent to the generic versions in
include/linux/perf_event.h so arch/arm doesn't need to provide its
own versions. Drop them here.
Signed-off-by: Colton Lewis
Acked-by: Will Deacon
Reviewed-by: Ol
still
misattribute a PMI that arrived in the host as a guest event depending
on KVM arch and vendor behavior.
Signed-off-by: Colton Lewis
Acked-by: Mark Rutland
Reviewed-by: Oliver Upton
---
arch/arm64/include/asm/perf_event.h | 4
arch/arm64/kernel/perf_callchain.c | 28
perf_ [kernel.kallsyms][k] __srcu_read_lock
1.03% dirty_log_perf_ [kernel.kallsyms][k] get_page_from_freelist
1.01% dirty_log_perf_ [kernel.kallsyms][k] __pte_offset_map_lock
0.82% dirty_log_perf_ [kernel.kallsyms][k] handle_mm_fault
0.74% dirty_log_perf_ [kernel.kallsyms]
Make sure powerpc uses the arch-specific function now that those have
been reorganized.
Signed-off-by: Colton Lewis
Acked-by: Madhavan Srinivasan
Reviewed-by: Oliver Upton
---
arch/powerpc/perf/callchain.c| 2 +-
arch/powerpc/perf/callchain_32.c | 2 +-
arch/powerpc/perf/callchain_64.c
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off-by: Colton Lewis
Acked-by: Thomas Richter
Acked-by: Mark Rutland
still
misattribute a PMI that arrived in the host as a guest event depending
on KVM arch and vendor behavior.
Signed-off-by: Colton Lewis
Acked-by: Mark Rutland
Reviewed-by: Oliver Upton
---
arch/arm64/include/asm/perf_event.h | 4
arch/arm64/kernel/perf_callchain.c | 28
Make sure powerpc uses the arch-specific function now that those have
been reorganized.
Signed-off-by: Colton Lewis
Acked-by: Madhavan Srinivasan
Reviewed-by: Oliver Upton
---
arch/powerpc/perf/callchain.c| 2 +-
arch/powerpc/perf/callchain_32.c | 2 +-
arch/powerpc/perf/callchain_64.c
For arm's implementation, perf_instruction_pointer() and
perf_misc_flags() are equivalent to the generic versions in
include/linux/perf_event.h so arch/arm doesn't need to provide its
own versions. Drop them here.
Signed-off-by: Colton Lewis
Reviewed-by: Oliver Upton
---
arch/arm/i
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
Reviewed-by: Oliver Upton
---
arch/x86/events/core.c| 31 +++
arch/x86/include/asm/perf_event.h | 2
perf_ [kernel.kallsyms][k] get_page_from_freelist
1.01% dirty_log_perf_ [kernel.kallsyms][k] __pte_offset_map_lock
0.82% dirty_log_perf_ [kernel.kallsyms][k] handle_mm_fault
0.74% dirty_log_perf_ [kernel.kallsyms] [k] mas_state_walk
Colton Lewis (5):
arm: perf: Drop
Thomas Richter writes:
On 9/20/24 19:47, Colton Lewis wrote:
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off
still
misattribute a PMI that arrived in the host as a guest event depending
on KVM arch and vendor behavior.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h | 4
arch/arm64/kernel/perf_callchain.c | 28
arch/x86/events/core.c | 16
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
---
arch/x86/events/core.c| 31 +++
arch/x86/include/asm/perf_event.h | 2 ++
2 files changed, 25
perf_ [kernel.kallsyms][k] get_page_from_freelist
1.01% dirty_log_perf_ [kernel.kallsyms][k] __pte_offset_map_lock
0.82% dirty_log_perf_ [kernel.kallsyms][k] handle_mm_fault
0.74% dirty_log_perf_ [kernel.kallsyms] [k] mas_state_walk
Colton Lewis (5):
arm: perf: Drop
Make sure powerpc uses the arch-specific function now that those have
been reorganized.
Signed-off-by: Colton Lewis
---
arch/powerpc/perf/callchain.c| 2 +-
arch/powerpc/perf/callchain_32.c | 2 +-
arch/powerpc/perf/callchain_64.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h
For arm's implementation, perf_instruction_pointer() and
perf_misc_flags() are equivalent to the generic versions in
include/linux/perf_event.h so arch/arm doesn't need to provide its
own versions. Drop them here.
Signed-off-by: Colton Lewis
---
arch/arm/include/asm/perf_ev
still
misattribute a PMI that arrived in the host as a guest event depending
on KVM arch and vendor behavior.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h | 4
arch/arm64/kernel/perf_callchain.c | 28
arch/x86/events/core.c | 16
Make sure powerpc uses the arch-specific function now that those have
been reorganized.
Signed-off-by: Colton Lewis
---
arch/powerpc/perf/callchain.c| 2 +-
arch/powerpc/perf/callchain_32.c | 2 +-
arch/powerpc/perf/callchain_64.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
---
arch/x86/events/core.c| 31 +++
arch/x86/include/asm/perf_event.h | 2 ++
2 files changed, 25
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h
ty_log_perf_ [kernel.kallsyms] [k] mas_state_walk
Colton Lewis (5):
arm: perf: Drop unused functions
perf: Hoist perf_instruction_pointer() and perf_misc_flags()
powerpc: perf: Use perf_arch_instruction_pointer()
x86: perf: Refactor misc flag assignments
perf: Correct perf sampling wit
For arm's implementation, perf_instruction_pointer() and
perf_misc_flags() are equivalent to the generic versions in
include/linux/perf_event.h so arch/arm doesn't need to provide its
own versions. Drop them here.
Signed-off-by: Colton Lewis
---
arch/arm/include/asm/perf_ev
Madhavan Srinivasan writes:
On 9/13/24 2:21 AM, Colton Lewis wrote:
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed
still
misattribute a PMI that arrived in the host as a guest event depending
on KVM arch and vendor behavior.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h | 4
arch/arm64/kernel/perf_callchain.c | 28
arch/x86/events/core.c | 16
Make sure powerpc uses the arch-specific function now that those have
been reorganized.
Signed-off-by: Colton Lewis
---
arch/powerpc/perf/callchain.c| 2 +-
arch/powerpc/perf/callchain_32.c | 2 +-
arch/powerpc/perf/callchain_64.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions
allsyms] [k] mas_state_walk
Colton Lewis (5):
arm: perf: Drop unused functions
perf: Hoist perf_instruction_pointer() and perf_misc_flags()
powerpc: perf: Use perf_arch_instruction_pointer()
x86: perf: Refactor misc flag assignments
perf: Correct perf sampling with guest VMs
arc
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
---
arch/x86/events/core.c| 31 +++
arch/x86/include/asm/perf_event.h | 2 ++
2 files changed, 25
For arm's implementation, perf_instruction_pointer() and
perf_misc_flags() are equivalent to the generic versions in
include/linux/perf_event.h so arch/arm doesn't need to provide its
own versions. Drop them here.
Signed-off-by: Colton Lewis
---
arch/arm/include/asm/perf_ev
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h
Sean Christopherson writes:
On Wed, Sep 11, 2024, Colton Lewis wrote:
Previously any PMU overflow interrupt that fired while a VCPU was
loaded was recorded as a guest event whether it truly was or not. This
resulted in nonsense perf recordings that did not honor
perf_event_attr.exclude_guest
sampling logic to only record guest samples for events with
exclude_guest clear. This way any host-only events with exclude_guest
set will never see unexpected guest samples. The behaviour of events
with exclude_guest clear is unchanged.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
---
arch/x86/events/core.c| 31 +++
arch/x86/include/asm/perf_event.h | 2 ++
2 files changed, 25
Make sure powerpc uses the arch-specific function now that those have
been reorganized.
Signed-off-by: Colton Lewis
---
arch/powerpc/perf/callchain.c| 2 +-
arch/powerpc/perf/callchain_32.c | 2 +-
arch/powerpc/perf/callchain_64.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h
perf_ [kernel.kallsyms] [k] mas_state_walk
Colton Lewis (5):
arm: perf: Drop unused functions
perf: Hoist perf_instruction_pointer() and perf_misc_flags()
powerpc: perf: Use perf_arch_instruction_pointer()
x86: perf: Refactor misc flag assignments
perf: Correct perf sampling with gu
For arm's implementation, perf_instruction_pointer() and
perf_misc_flags() are equivalent to the generic versions in
include/linux/perf_event.h so arch/arm doesn't need to provide its
own versions. Drop them here.
Signed-off-by: Colton Lewis
---
arch/arm/include/asm/perf_ev
Ingo Molnar writes:
* Colton Lewis wrote:
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
---
arch/x86/events/core.c| 31 +++
arch/x86
Ingo Molnar writes:
* Colton Lewis wrote:
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6915,6 +6915,16 @@ void perf_unregister_guest_info_callbacks(struct
perf_guest_info_callbacks *cbs)
EXPORT_SYMBOL_GPL(perf_unregister_guest_info_callbacks);
#endif
+unsigned long
Mark Rutland writes:
On Wed, Sep 04, 2024 at 08:41:33PM +, Colton Lewis wrote:
Previously any PMU overflow interrupt that fired while a VCPU was
loaded was recorded as a guest event whether it truly was or not. This
resulted in nonsense perf recordings that did not honor
Mark Rutland writes:
On Wed, Sep 04, 2024 at 08:41:29PM +, Colton Lewis wrote:
perf_instruction_pointer() and perf_misc_flags() aren't used anywhere
in this particular perf implementation. Drop them.
I think it'd be better to say that arch/arm's implementation of these i
that plumbing to record perf events correctly even when
VCPUs are loaded.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h | 4
arch/arm64/kernel/perf_callchain.c | 28
arch/x86/events/core.c | 16
include/linux
Make sure powerpc uses the arch-specific function now that those have
been reorganized.
Signed-off-by: Colton Lewis
---
arch/powerpc/perf/callchain.c| 2 +-
arch/powerpc/perf/callchain_32.c | 2 +-
arch/powerpc/perf/callchain_64.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions
Break the assignment logic for misc flags into their own respective
functions to reduce the complexity of the nested logic.
Signed-off-by: Colton Lewis
---
arch/x86/events/core.c| 31 +++
arch/x86/include/asm/perf_event.h | 2 ++
2 files changed, 25
For clarity, rename the arch-specific definitions of these functions
to perf_arch_* to denote they are arch-specifc. Define the
generic-named functions in one place where they can call the
arch-specific ones as needed.
Signed-off-by: Colton Lewis
---
arch/arm64/include/asm/perf_event.h
ault
0.74% dirty_log_perf_ [kernel.kallsyms] [k] mas_state_walk
Colton Lewis (5):
arm: perf: Drop unused functions
perf: Hoist perf_instruction_pointer() and perf_misc_flags()
powerpc: perf: Use perf_arch_instruction_pointer()
x86: perf: Refactor misc flag assignments
perf: Correct perf samp
perf_instruction_pointer() and perf_misc_flags() aren't used anywhere
in this particular perf implementation. Drop them.
Signed-off-by: Colton Lewis
---
arch/arm/include/asm/perf_event.h | 7 ---
arch/arm/kernel/perf_callchain.c | 17 -
2 files changed, 24 dele
58 matches
Mail list logo