• Arnaldo Carvalho de Melo's avatar
    perf trace: Fix setting of augmented payload when using eBPF + raw_syscalls · cd26ea6d
    Arnaldo Carvalho de Melo authored
    For now with BPF raw_augmented we hook into raw_syscalls:sys_enter and
    there we get all 6 syscall args plus the tracepoint common fields
    (sizeof(long)) and the syscall_nr (another long). So we check if that is
    the case and if so don't look after the sc->args_size, but always after
    the full raw_syscalls:sys_enter payload, which is fixed.
    
    We'll revisit this later to pass s->args_size to the BPF augmenter (now
    tools/perf/examples/bpf/augmented_raw_syscalls.c, so that it copies only
    what we need for each syscall, like what happens when we use
    syscalls:sys_enter_NAME, so that we reduce the kernel/userspace traffic
    to just what is needed for each syscall.
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: https://lkml.kernel.org/n/tip-nlslrg8apxdsobt4pwl3n7ur@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    cd26ea6d
builtin-trace.c 101 KB