summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-08-07 03:18:00 -0700
committerAndreas Kling <kling@serenityos.org>2021-08-07 12:38:59 +0200
commitd496eb48e3ae3cafaa0da706e6ca6679a275b084 (patch)
tree33b6a5fef66c56aaf2f209f3f2814463d37eb995
parent58fb38551cd783b8f7e60fdf8dc6a1ae8b74642c (diff)
downloadserenity-d496eb48e3ae3cafaa0da706e6ca6679a275b084.zip
Kernel: Fix boot profiling after big process lock separation regression
When I laid down the foundation for the start of the big process lock separation, I added asserts to all system call implementations to validate we hold the big process lock in the locations we think we should be. Adding that assert to sys$profiling_enable broke boot time profiling as we were never holding the lock on boot. Even though it's not technically required, lets make sure to hold the lock while enabling to appease the assert.
-rw-r--r--Kernel/init.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index b82540966f..cde935f45f 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -355,6 +355,7 @@ void init_stage2(void*)
if (boot_profiling) {
dbgln("Starting full system boot profiling");
+ MutexLocker mutex_locker(Process::current()->big_lock());
auto result = Process::current()->sys$profiling_enable(-1, ~0ull);
VERIFY(!result.is_error());
}