• Arnaldo Carvalho de Melo's avatar
    perf augmented_raw_syscalls: Copy strings from all syscalls with 1st or 2nd string arg · c52a82f7
    Arnaldo Carvalho de Melo authored
    Gets the augmented_raw_syscalls a bit more useful as-is, add a comment
    stating that the intent is to have all this in a map populated by
    userspace via the 'syscalls' BPF map, that right now has only a flag
    stating if the syscall is filtered or not.
    
    With it:
    
      # grep -B1 augmented_raw ~/.perfconfig
      [trace]
    	add_events = /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o
      #
      # perf trace -e string
      weechat/6001 stat("/etc/localtime", 0x7ffe22c23d10)  = 0
      gnome-shell/1943 openat(AT_FDCWD, "/proc/self/stat", O_RDONLY) = 81
      weechat/6001 stat("/etc/localtime", 0x7ffe22c23d10)  = 0
      gmain/2475 inotify_add_watch(20<anon_inode:inotify>, "/home/acme/.config/firewall", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2391 inotify_add_watch(3<anon_inode:inotify>, "", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2391 inotify_add_watch(3<anon_inode:inotify>, "/var/cache/app-info/yaml", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2391 inotify_add_watch(3<anon_inode:inotify>, "/var/lib/app-info/xmls", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2391 inotify_add_watch(3<anon_inode:inotify>, "/var/lib/app-info/yaml", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2391 inotify_add_watch(3<anon_inode:inotify>, "/usr/share/app-info/yaml", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2391 inotify_add_watch(3<anon_inode:inotify>, "/usr/local/share/app-info/xmls", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2391 inotify_add_watch(3<anon_inode:inotify>, "/usr/local/share/app-info/yaml", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2391 inotify_add_watch(3<anon_inode:inotify>, "/home/acme/.local/share/app-info/yaml", 16789454) = -1 ENOENT (No such file or directory)
      gmain/1121 inotify_add_watch(12<anon_inode:inotify>, "/etc/NetworkManager/VPN", 16789454) = -1 ENOENT (No such file or directory)
      weechat/6001 stat("/etc/localtime", 0x7ffe22c23d10)  = 0
      gmain/2050 inotify_add_watch(8<anon_inode:inotify>, "/home/acme/~", 16789454) = -1 ENOENT (No such file or directory)
      gmain/2521 inotify_add_watch(6<anon_inode:inotify>, "/var/lib/fwupd/remotes.d/lvfs-testing", 16789454) = -1 ENOENT (No such file or directory)
      weechat/6001 stat("/etc/localtime", 0x7ffe22c23d10)  = 0
      DOM Worker/22714  ... [continued]: openat())             = 257
      FS Broker 3982/3990 openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY) = 187
      DOMCacheThread/16652 mkdir("/home/acme/.mozilla/firefox/ina67tev.default/storage/default/https+++web.whatsapp.com/cache/morgue/192", S_IRUGO|S_IXUGO|S_IWUSR) = -1 EEXIST (File exists)
      ^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>
    Link: https://lkml.kernel.org/n/tip-a1hxffoy8t43e0wq6bzhp23u@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    c52a82f7
augmented_raw_syscalls.c 8.61 KB