05 Sep, 2015

1 commit


21 Jul, 2015

1 commit

  • I.e.:

    $ cat ~/share/perf-core/strace/groups/file
    access
    chmod
    creat
    execve
    faccessat
    getcwd
    lstat
    mkdir
    open
    openat
    quotactl
    readlink
    rename
    rmdir
    stat
    statfs
    symlink
    unlink
    $

    Then, on a quiet desktop, try running this and then moving your mouse to
    see the deluge of mouse related activity:

    # perf probe 'vfs_getname=getname_flags:72 pathname=filename:string'
    Added new event:
    probe:vfs_getname (on getname_flags:72 with pathname=filename:string)

    You can now use it in all perf tools, such as:

    perf record -e probe:vfs_getname -aR sleep 1
    #
    # trace --ev probe:vfs_getname --filter-pids 2232 -e file
    0.042 (0.042 ms): mousetweaks/2235 open(filename: 0x14e3910, mode: 438 ) ...
    0.042 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/cursors/xterm")
    0.100 (0.100 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
    0.142 (0.018 ms): mousetweaks/2235 open(filename: 0x14c3c10, mode: 438 ) ...
    0.142 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/index.theme")
    0.192 (0.069 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
    0.230 (0.017 ms): mousetweaks/2235 open(filename: 0x14c3c10, mode: 438 ) ...
    0.230 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/usr/share/icons/Adwaita/cursors/xterm")
    0.253 (0.041 ms): mousetweaks/2235 ... [continued]: open()) = 14
    0.459 (0.008 ms): mousetweaks/2235 open(filename: 0x14e3910, mode: 438 ) ...
    0.459 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/cursors/left_side")
    0.468 (0.017 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory

    Need to combine that raw_syscalls:sys_enter(open) + probe:vfs_getname +
    raw_syscalls:sys_exit(open) sequence...

    Now, if you're bored, please write some more syscall groups, like the ones
    in 'strace' and send it our way :-)

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Milian Wolff
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-a42xklu59lcbxp7bbnic74a8@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo