Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 'tools/statsnoop' from failing to attach kprobes
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: Sandipan Das <sandipan@linux.vnet.ibm.com>
- Loading branch information