summaryrefslogtreecommitdiff
path: root/Kernel/UnixTypes.h
diff options
context:
space:
mode:
authorJean-Baptiste Boric <jblbeurope@gmail.com>2021-08-10 21:02:59 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-10 21:55:48 +0200
commit0286160b62dd4871ddddd89276398739d7d737b0 (patch)
tree020c7d332ce12f51e92a9625584799a161660968 /Kernel/UnixTypes.h
parent4c4b8ea443bceb14e041e6d4e6b6a56988aad0c7 (diff)
downloadserenity-0286160b62dd4871ddddd89276398739d7d737b0.zip
Kernel: Add syscall performance event type
This allows tracing the syscalls made by a thread through the kernel's performance event framework, which is similar in principle to strace. Currently, this merely logs a stack backtrace to the current thread's performance event buffer whenever a syscall is made, if profiling is enabled. Future improvements could include tracing the arguments and the return value, for example.
Diffstat (limited to 'Kernel/UnixTypes.h')
-rw-r--r--Kernel/UnixTypes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/UnixTypes.h b/Kernel/UnixTypes.h
index 44a3351a8a..9ebc56bca8 100644
--- a/Kernel/UnixTypes.h
+++ b/Kernel/UnixTypes.h
@@ -62,6 +62,7 @@ enum {
PERF_EVENT_KMALLOC = 2048,
PERF_EVENT_KFREE = 4096,
PERF_EVENT_PAGE_FAULT = 8192,
+ PERF_EVENT_SYSCALL = 16384,
};
#define WNOHANG 1