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

2024-11-06 Thread Oliver Upton
On Wed, Nov 06, 2024 at 03:33:30PM -0500, Liang, Kan wrote: > On 2024-11-06 3:02 p.m., Oliver Upton wrote: > > On Wed, Nov 06, 2024 at 11:03:10AM -0500, Liang, Kan wrote: > >>> +static unsigned long common_misc_flags(struct pt_regs *regs) > >>> +{ > >>> + if (regs->flags & PERF_EFLAGS_EXACT) > >>>

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

2024-11-06 Thread Liang, Kan
On 2024-11-06 3:02 p.m., Oliver Upton wrote: > On Wed, Nov 06, 2024 at 11:03:10AM -0500, Liang, Kan wrote: >>> +static unsigned long common_misc_flags(struct pt_regs *regs) >>> +{ >>> + if (regs->flags & PERF_EFLAGS_EXACT) >>> + return PERF_RECORD_MISC_EXACT_IP; >>> + >>> + return

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

2024-11-06 Thread Oliver Upton
On Wed, Nov 06, 2024 at 11:03:10AM -0500, Liang, Kan wrote: > > +static unsigned long common_misc_flags(struct pt_regs *regs) > > +{ > > + if (regs->flags & PERF_EFLAGS_EXACT) > > + return PERF_RECORD_MISC_EXACT_IP; > > + > > + return 0; > > +} > > + > > +unsigned long perf_arch_guest

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

2024-11-06 Thread Liang, Kan
On 2024-11-05 2:56 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 > --- > arch/x86/events/core.c| 31

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

2024-11-05 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| 31 +++ arch/x86/include/asm/perf_event.h | 2 ++