[PATCH 1/3] Add %clock trace class
Dmitry V. Levin
ldv at altlinux.org
Thu Apr 16 23:34:31 UTC 2020
On Fri, Apr 17, 2020 at 12:04:11AM +0200, Ákos Uzonyi wrote:
> The %clock class includes the syscalls that read or modify system clock.
>
> linux/*/syscallent*.h part is updated automatically by:
> sed -i -r '
> /\"(.*adjtime.*|.*clock_(get|set|adj).*|.*(get|set)timeofday.*|time)\"/ {
I'm not sure why do you want to escape double-quote here.
> s/(\{[^,]*,\t[^0][^,]*)/\1|TCL/
> s/(\{[^,]*,\s*)0/\1TCL/
> }
> ' linux/*/syscallent.h
>
> * basic_filters.c (loopup_class): Add %clock member to syscall_class[].
> * linux/64/syscallent.h: Add TCL flag to credentials syscalls.
Sorry, why do you add TCL flag to credentials syscalls?
> * linux/alpha/syscallent.h: Likewise
> * linux/arm/syscallent.h: Likewise
> * linux/avr32/syscallent.h: Likewise
> * linux/bfin/syscallent.h: Likewise
> * linux/hppa/syscallent.h: Likewise
> * linux/i386/syscallent.h: Likewise
> * linux/ia64/syscallent.h: Likewise
> * linux/m68k/syscallent.h: Likewise
> * linux/microblaze/syscallent.h: Likewise
> * linux/powerpc/syscallent.h: Likewise
> * linux/powerpc64/syscallent.h: Likewise
> * linux/s390/syscallent.h: Likewise
> * linux/s390x/syscallent.h: Likewise
> * linux/sh/syscallent.h: Likewise
> * linux/sh64/syscallent.h: Likewise
> * linux/sparc/syscallent.h: Likewise
> * linux/sparc64/syscallent.h: Likewise
> * linux/x32/syscallent.h: Likewise
> * linux/x86_64/syscallent.h: Likewise
> * linux/xtensa/syscallent.h: Likewise
> * strace.1.in: Add %clock description
> * strace.c (usage): Add %clock group to help message
Please mark the end of sentences with a period.
> * sysent.h (TRACE_CLOCK): New definition.
> * sysent_shorthand_defs.h (TC): Likewise.
> * sysent_shorthand_undefs.h (TC): Add undef.
> * NEWS: Mention this.
>
> Signed-off-by: Ákos Uzonyi <uzonyi.akos at gmail.com>
> ---
> NEWS | 1 +
> basic_filters.c | 1 +
> linux/64/syscallent.h | 14 +++++++-------
> linux/alpha/syscallent.h | 26 +++++++++++++-------------
> linux/arm/syscallent.h | 16 ++++++++--------
> linux/avr32/syscallent.h | 16 ++++++++--------
> linux/bfin/syscallent.h | 16 ++++++++--------
> linux/hppa/syscallent.h | 16 ++++++++--------
> linux/i386/syscallent.h | 16 ++++++++--------
> linux/ia64/syscallent.h | 14 +++++++-------
> linux/m68k/syscallent.h | 16 ++++++++--------
> linux/microblaze/syscallent.h | 16 ++++++++--------
> linux/powerpc/syscallent.h | 16 ++++++++--------
> linux/powerpc64/syscallent.h | 16 ++++++++--------
> linux/s390/syscallent.h | 16 ++++++++--------
> linux/s390x/syscallent.h | 14 +++++++-------
> linux/sh/syscallent.h | 16 ++++++++--------
> linux/sh64/syscallent.h | 16 ++++++++--------
> linux/sparc/syscallent.h | 16 ++++++++--------
> linux/sparc64/syscallent.h | 14 +++++++-------
> linux/x32/syscallent.h | 16 ++++++++--------
> linux/x86_64/syscallent.h | 16 ++++++++--------
> linux/xtensa/syscallent.h | 14 +++++++-------
> strace.1.in | 3 +++
> strace.c | 2 +-
> sysent.h | 1 +
> sysent_shorthand_defs.h | 3 +++
> sysent_shorthand_undefs.h | 1 +
> 28 files changed, 179 insertions(+), 169 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 6292e1c3..94a91474 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -3,6 +3,7 @@ Noteworthy changes in release ?.? (????-??-??)
>
> * Improvements
> * Updated lists of BPF_* constants.
> + * Added -e trace=%clock option for tracing syscalls reading of modifying system clocks.
Please wrap long lines so that they don't exceed the historical limit
of 80 symbols.
[...]
> diff --git a/sysent_shorthand_defs.h b/sysent_shorthand_defs.h
> index 9aca376c..867d7f69 100644
> --- a/sysent_shorthand_defs.h
> +++ b/sysent_shorthand_defs.h
> @@ -29,6 +29,8 @@
> # define CST 0
> # define TSD 0
> # define TC 0
> +# define TC 0
> +# define TCL 0
> # define SEN(a) 0, 0
>
> #else /* !STRACE_TESTS_H */
Do you really need a second definition of TC?
--
ldv
More information about the Strace-devel
mailing list