Re: [PATCH Linux-next] perf test: Fix test case perf trace BTF general tests

Howard Chu
2025-11-26T19:01:14Z

Hi guys,

On Wed, Nov 26, 2025 at 10:57 AM Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Wed, Nov 26, 2025 at 12:12:29PM -0500, Steven Rostedt wrote:
> >
> > Arnaldo,
> >
> > How can I make perf trace not confused by the extra fields in the system
> > call trace events?
> >
> > Ftrace can now show the contents of the system call user space buffers, but
> > it appears that this breaks perf!!!
> >
> > system: syscalls
> > name: sys_enter_write
> > ID: 791
> > format:
> > field:unsigned short common_type; offset:0; size:2; signed:0;
> > field:unsigned char common_flags; offset:2; size:1; signed:0;
> > field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
> > field:int common_pid; offset:4; size:4; signed:1;
> >
> > field:int __syscall_nr; offset:8; size:4; signed:1;
> > field:unsigned int fd; offset:16; size:8; signed:0;
> > field:const char * buf; offset:24; size:8; signed:0;
> > field:size_t count; offset:32; size:8; signed:0;
> > field:__data_loc char[] __buf_val; offset:40; size:4; signed:0;
> >
> > That new __buf_val appears to confuse perf, but I'm having a hell of a time
> > trying to figure out where it reads it!
>
> I've discussed with Steven and concluded that we should change perf to
> ignore fields with "__data_loc char[]" type in syscalls. Let me take a
> look.

Thanks, I'll also give it a look.

Thanks,
Howard

>
> Thanks,
> Namhyung
>
>