summaryrefslogtreecommitdiff
path: root/Kernel/Syscall.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-02 20:26:27 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-02 20:26:27 +0100
commit3879e5b9d454e08b301721ad3044f90d03026db3 (patch)
tree7931babdd2127410ed93915d788ab3883144c156 /Kernel/Syscall.h
parent25b635c841e209c7fd67be5406a941fa829f9bf2 (diff)
downloadserenity-3879e5b9d454e08b301721ad3044f90d03026db3.zip
Kernel: Start working on a syscall for logging performance events
This patch introduces sys$perf_event() with two event types: - PERF_EVENT_MALLOC - PERF_EVENT_FREE After the first call to sys$perf_event(), a process will begin keeping these events in a buffer. When the process dies, that buffer will be written out to "perfcore" in the current directory unless that filename is already taken. This is probably not the best way to do this, but it's a start and will make it possible to start doing memory allocation profiling. :^)
Diffstat (limited to 'Kernel/Syscall.h')
-rw-r--r--Kernel/Syscall.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Syscall.h b/Kernel/Syscall.h
index a5541ab68c..19f755a99e 100644
--- a/Kernel/Syscall.h
+++ b/Kernel/Syscall.h
@@ -175,7 +175,8 @@ typedef u32 socklen_t;
__ENUMERATE_SYSCALL(set_process_boost) \
__ENUMERATE_SYSCALL(chroot) \
__ENUMERATE_SYSCALL(pledge) \
- __ENUMERATE_SYSCALL(unveil)
+ __ENUMERATE_SYSCALL(unveil) \
+ __ENUMERATE_SYSCALL(perf_event)
namespace Syscall {