summaryrefslogtreecommitdiff
path: root/include/linux/syscalls.h
diff options
context:
space:
mode:
authorAlex Van Brunt <avanbrunt@nvidia.com>2014-05-07 11:04:41 -0700
committerRiham Haidar <rhaidar@nvidia.com>2014-05-14 15:28:36 -0700
commitd19fb94d428db93465c50c4284bc50315871933a (patch)
treed6d8455671d61c07dba239f5d8b92496fea9571e /include/linux/syscalls.h
parent005d0f7eb1ad702332ad12834d0f6dc90d3fd28c (diff)
syscalls: add trace events for system calls
Add trace events for the entry point and exit point of all system calls. This makes it possible to account for the time spent in each system call. Change-Id: Iba88c0a38424ea8e986954e23f13f4417578379d Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com> Reviewed-on: http://git-master/r/407691 GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r--include/linux/syscalls.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 84662ecc7b51..6e24400b5346 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -77,6 +77,8 @@ struct sigaltstack;
#include <linux/quota.h>
#include <linux/key.h>
#include <trace/syscall.h>
+#undef CREATE_TRACE_POINTS
+#include <trace/events/sys_calls.h>
/*
* __MAP - apply a macro to syscall arguments
@@ -188,7 +190,10 @@ extern struct trace_event_functions exit_syscall_print_funcs;
static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
{ \
- long ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \
+ long ret; \
+ trace_syscall_enter(""#name); \
+ ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \
+ trace_syscall_exit(""#name); \
__MAP(x,__SC_TEST,__VA_ARGS__); \
__PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
return ret; \