Older kernels (e.g., RHEL6) do system call tracing via the syscalls:sys_{enter,exit} tracepoints rather than using raw_syscalls:*. Update perf python and perl scripts to fallback to syscalls:* when raw_syscalls:* isn't available.
Showing the changes to tools/perf/scripts/python/failed-syscalls-by-pid.py (1 of 10 files). Show all
Unified · Split
| @@ -50,6 +50,11 @@ def raw_syscalls__sys_exit(event_name, context, common_cpu, · 49 unmodified lines | ||
| 50 | 50 | except TypeError: |
| 51 | 51 | syscalls[common_comm][common_pid][id][ret] = 1 |
| 52 | 52 | |
| 53 | +def syscalls__sys_exit(event_name, context, common_cpu, | |
| 54 | + common_secs, common_nsecs, common_pid, common_comm, | |
| 55 | + id, ret): | |
| 56 | + raw_syscalls__sys_exit(**locals()) | |
| 57 | + | |
| 53 | 58 | def print_error_totals(): |
| 54 | 59 | if for_comm is not None: |
| 55 | 60 | print "\nsyscall errors for %s:\n\n" % (for_comm), |