• Sandipan Das's avatar
    Fix 'tools/statsnoop' from failing to attach kprobes · 16523a38
    Sandipan Das authored
    This fixes 'tools/statsnoop' from failing to attach probes
    when the expected entry point for a system call cannot be
    found. This script uses the 'stat', 'statfs' and 'newstat'
    system calls, all of which must be implemented to be POSIX
    compliant. However, the names of the actual entry points
    for their respective implementations in the kernel might
    vary across architectures. For example, a powerpc64 kernel
    does not define 'sys_stat' but still provides the 'stat'
    system call via 'sys_newstat'. This causes the script to
    fail if it tries to attach a probe at 'sys_stat'. We avoid
    this by performing some extra checks to see if these entry
    points exist.
    Signed-off-by: default avatarSandipan Das <sandipan@linux.vnet.ibm.com>
    16523a38
statsnoop.py 4.45 KB