From d496eb48e3ae3cafaa0da706e6ca6679a275b084 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sat, 7 Aug 2021 03:18:00 -0700 Subject: 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. --- Kernel/init.cpp | 1 + 1 file changed, 1 insertion(+) 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()); } -- cgit v1.2.3