mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:38:10 +00:00
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. :^)
This commit is contained in:
parent
25b635c841
commit
3879e5b9d4
7 changed files with 225 additions and 1 deletions
|
@ -28,6 +28,9 @@
|
|||
|
||||
#include <AK/Types.h>
|
||||
|
||||
#define PERF_EVENT_MALLOC 1
|
||||
#define PERF_EVENT_FREE 2
|
||||
|
||||
#define WNOHANG 1
|
||||
#define WUNTRACED 2
|
||||
#define WSTOPPED WUNTRACED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue