[PATCH 3/5] mmap_notify: rename sys_flags for tracking memory mapping

Masatake YAMATO yamato at redhat.com
Sun Apr 29 21:45:38 UTC 2018


* sysent.h: Rename STACKTRACE_INVALIDATE_CACHE to
MEMORY_MAPPPING_CHANGE.

* sysent_shorthand_defs.h (SI): Use the new name as definition.

* syscall.c (syscall_exiting_decode): Use the new name.

Signed-off-by: Masatake YAMATO <yamato at redhat.com>
---
 syscall.c               | 2 +-
 sysent.h                | 2 +-
 sysent_shorthand_defs.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/syscall.c b/syscall.c
index c9261968..829062f2 100644
--- a/syscall.c
+++ b/syscall.c
@@ -744,7 +744,7 @@ syscall_exiting_decode(struct tcb *tcp, struct timespec *pts)
 	if ((Tflag || cflag) && !(filtered(tcp) || hide_log(tcp)))
 		clock_gettime(CLOCK_MONOTONIC, pts);
 
-	if (tcp->s_ent->sys_flags & STACKTRACE_INVALIDATE_CACHE)
+	if (tcp->s_ent->sys_flags & MEMORY_MAPPPING_CHANGE)
 		mmap_notify_report(tcp);
 
 	if (filtered(tcp) || hide_log(tcp))
diff --git a/sysent.h b/sysent.h
index b01eb5f3..c04c1f60 100644
--- a/sysent.h
+++ b/sysent.h
@@ -17,7 +17,7 @@ typedef struct sysent {
 #define TRACE_DESC			00000040	/* Trace file descriptor-related syscalls. */
 #define TRACE_MEMORY			00000100	/* Trace memory mapping-related syscalls. */
 #define SYSCALL_NEVER_FAILS		00000200	/* Syscall is always successful. */
-#define STACKTRACE_INVALIDATE_CACHE	00000400	/* Trigger proc/maps cache updating */
+#define MEMORY_MAPPPING_CHANGE		00000400	/* Trigger proc/maps cache updating */
 #define STACKTRACE_CAPTURE_ON_ENTER	00001000	/* Capture stacktrace on "entering" stage */
 #define TRACE_INDIRECT_SUBCALL		00002000	/* Syscall is an indirect socket/ipc subcall. */
 #define COMPAT_SYSCALL_TYPES		00004000	/* A compat syscall that uses compat types. */
diff --git a/sysent_shorthand_defs.h b/sysent_shorthand_defs.h
index ce435504..33cc6bf3 100644
--- a/sysent_shorthand_defs.h
+++ b/sysent_shorthand_defs.h
@@ -41,7 +41,7 @@
 # define PU	TRACE_PURE
 # define NF	SYSCALL_NEVER_FAILS
 # define MA	MAX_ARGS
-# define SI	STACKTRACE_INVALIDATE_CACHE
+# define SI	MEMORY_MAPPPING_CHANGE
 # define SE	STACKTRACE_CAPTURE_ON_ENTER
 # define CST	COMPAT_SYSCALL_TYPES
 /* SEN(a) is defined elsewhere */
-- 
2.14.3



More information about the Strace-devel mailing list