• Arnaldo Carvalho de Melo's avatar
    perf trace: Fixup etcsnoop example · 8f4264f5
    Arnaldo Carvalho de Melo authored
    [ Upstream commit 1d59cb1b ]
    
    Where we don't have "raw_syscalls:sys_enter", so we need to look for a
    "*syscalls:sys_enter*" to initialize the offsets for the
    __augmented_syscalls__ evsel, which is the case with etcsnoop, that was
    segfaulting, fixed:
    
      # trace -e /home/acme/git/perf/tools/perf/examples/bpf/etcsnoop.c
         0.000 (         ): gnome-shell/2105 openat(dfd: CWD, filename: "/etc/localtime")                       ...
       631.834 (         ): cat/6521 openat(dfd: CWD, filename: "/etc/ld.so.cache", flags: RDONLY|CLOEXEC) ...
       632.637 (         ): bash/6521 openat(dfd: CWD, filename: "/etc/passwd")                          ...
      ^C#
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Wang Nan <wangnan0@huawei.com>
    Fixes: b9b6a2ea ("perf trace: Do not hardcode the size of the tracepoint common_ fields")
    Link: https://lkml.kernel.org/n/tip-0tjwcit8qitsmh4nyvf2b0jo@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    8f4264f5
builtin-trace.c 112 KB