From ed84a97da5aa9fc37868d880500b7af6a3d0b40a Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Tue, 18 Apr 2017 01:14:58 +0200 Subject: Implement -e trace=%%stat option linux/*/syscallent*.h part is updated automatically by: sed -i '/TSFA\|stat[iu]s/! s/,[[:space:]]\?\([[:space:]]*SEN(.*stat\)/|TSTA,\1/' \ linux/*/syscallent*.h * sysent.h (TRACE_STAT_LIKE): New macro. * syscall.c: Alias TSTA to TRACE_STAT_LIKE around syscallent.h inclusion. * qualify.c (lookup_class): Add TRACE_STAT_LIKE for "%%stat". * strace.1 (.SS Filtering): Add information about %%stat syscall class. * NEWS: Mention this change. * linux/32/syscallent.h (fstat64, fstatat64, statx): Add TSTA flag. * linux/64/syscallent.h (fstat, newfstatat, statx): Likewise. * linux/aarch64/syscallent.h (fstat, lstat, newfstatat, stat): Likewise. * linux/alpha/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, osf_fstat, osf_lstat, osf_old_fstat, osf_old_lstat, osf_old_stat, osf_stat, stat, stat64): Likewise. * linux/arm/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise. * linux/avr32/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat, stat64): Likewise. * linux/bfin/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64): Likewise. * linux/crisv10/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64): Likewise. * linux/hppa/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat, stat64): Likewise. * linux/i386/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise. * linux/ia64/syscallent.h (fstat, lstat, newfstatat, stat): Likewise. * linux/m68k/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise. * linux/microblaze/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64): Likewise. * linux/mips/syscallent-compat.h (bsd43_fstat, bsd43_lstat, bsd43_oldfstat, bsd43_oldstat, bsd43_stat, posix_fstat, posix_lstat, posix_stat, svr4_fstat, svr4_fxstat, svr4_lstat, svr4_lxstat, svr4_stat, svr4_xstat, sysv_fstat, sysv_fxstat, sysv_lstat, sysv_lxstat, sysv_stat, sysv_xstat): Likewise. * linux/mips/syscallent-n32.h (fstat, lstat, newfstatat, stat, statx): Likewise. * linux/mips/syscallent-n64.h (fstat, lstat, newfstatat, stat, statx): Likewise. * linux/mips/syscallent-o32.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise. * linux/powerpc64/syscallent.h (fstat, lstat, newfstatat, oldfstat, oldlstat, oldstat, stat): Likewise. * linux/powerpc/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise. * linux/s390/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat, stat64, statx): Likewise. * linux/s390x/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise. * linux/sh64/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64): Likewise. * linux/sh/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat, oldlstat, oldstat, stat, stat64): Likewise. * linux/sparc64/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldlstat, stat, stat64): Likewise. * linux/sparc/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldlstat, stat, stat64): Likewise. * linux/x32/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise. * linux/x86_64/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise. * linux/xtensa/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat, stat64, statx): Likewise. * tests/gen_tests.in (trace_stat_like): New entry. * tests/trace_stat_like.in: New file. * tests/Makefile.am (EXTRA_DIST): Add it. * tests/ksysent.c (TSTA): New macro, defined to 0. * tests/nsyscalls.c: Likewise. --- tests/trace_stat_like.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/trace_stat_like.in (limited to 'tests/trace_stat_like.in') diff --git a/tests/trace_stat_like.in b/tests/trace_stat_like.in new file mode 100644 index 000000000..22bd7f27c --- /dev/null +++ b/tests/trace_stat_like.in @@ -0,0 +1,12 @@ +fstat -a15 +fstat64 -a17 +fstatat64 -a32 +lstat -a32 +lstat64 -a32 +newfstatat -a32 +oldfstat -a21 +oldlstat -a32 +oldstat -a32 +stat -a32 +stat64 -a32 +statx -a32 -- cgit v1.2.1