From f9a138aa4b9d96f59d20219179038805b0c8755e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 21 Feb 2020 12:59:46 +0100 Subject: [PATCH] Kernel: Commit the profiling sample buffer memory up front This avoids getting page faults while storing samples in the timer IRQ. --- Kernel/Profiling.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Kernel/Profiling.cpp b/Kernel/Profiling.cpp index bb16d68b9f..23db4ffe96 100644 --- a/Kernel/Profiling.cpp +++ b/Kernel/Profiling.cpp @@ -48,6 +48,7 @@ void start(Process& process) if (!s_profiling_buffer) { s_profiling_buffer = RefPtr(KBuffer::create_with_size(8 * MB).impl()).leak_ref(); + s_profiling_buffer->region().commit(); s_slot_count = s_profiling_buffer->size() / sizeof(Sample); }