summaryrefslogtreecommitdiff
path: root/Kernel/Profiling.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-21 12:59:46 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-21 15:49:37 +0100
commitf9a138aa4b9d96f59d20219179038805b0c8755e (patch)
tree8ed6e8f97237439312ac754fffbf81498a75392e /Kernel/Profiling.cpp
parent8047ff8205b5e07d99f2bf0b9a82302a698674ef (diff)
downloadserenity-f9a138aa4b9d96f59d20219179038805b0c8755e.zip
Kernel: Commit the profiling sample buffer memory up front
This avoids getting page faults while storing samples in the timer IRQ.
Diffstat (limited to 'Kernel/Profiling.cpp')
-rw-r--r--Kernel/Profiling.cpp1
1 files changed, 1 insertions, 0 deletions
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<KBufferImpl>(KBuffer::create_with_size(8 * MB).impl()).leak_ref();
+ s_profiling_buffer->region().commit();
s_slot_count = s_profiling_buffer->size() / sizeof(Sample);
}