Re: [PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-13 Thread Colton Lewis
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->flags & PERF_EFLAGS_EXA

Re: [PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-13 Thread Colton Lewis
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

Re: [PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-08 Thread Peter Zijlstra
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 |= PERF_RECORD_MISC_EX

Re: [PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-08 Thread Peter Zijlstra
On Fri, Nov 08, 2024 at 07:01:16PM +, Colton Lewis wrote: > 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. > > >

Re: [PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-08 Thread Colton Lewis
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/core

Re: [PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-08 Thread Peter Zijlstra
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/core.c| 3

Re: [PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-07 Thread Liang, Kan
On 2024-11-07 2:03 p.m., 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 > --- Acked-by: Kan Liang Thanks, Kan > arch/x86/events/

[PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-07 Thread Colton Lewis
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 ++