mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:24:58 +00:00
Kernel: Generate page fault events from the kernel profiler
Hook the kernel page fault handler and capture page fault events when the fault has a current thread attached in TLS. We capture the eip and ebp so we can unwind the stack and locate which pieces of code are generating the most page faults. Co-authored-by: Gunnar Beutner <gbeutner@serenityos.org>
This commit is contained in:
parent
6ac1ca5a9a
commit
83fc591cea
7 changed files with 47 additions and 2 deletions
|
@ -60,6 +60,7 @@ enum {
|
|||
PERF_EVENT_CONTEXT_SWITCH = 1024,
|
||||
PERF_EVENT_KMALLOC = 2048,
|
||||
PERF_EVENT_KFREE = 4096,
|
||||
PERF_EVENT_PAGE_FAULT = 8192,
|
||||
};
|
||||
|
||||
#define WNOHANG 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue