1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

Kernel: Unbreak profiling all processes

Regressed in 8a4cc735b9.
We stopped generating "process created" when enabling profiling,
which led to Profiler getting confused about the missing events.
This commit is contained in:
Andreas Kling 2021-05-15 21:25:54 +02:00
parent 19a696e397
commit 4d429ba9ea

View file

@ -32,11 +32,11 @@ KResultOr<int> Process::sys$profiling_enable(pid_t pid)
ScopedSpinLock lock(g_processes_lock);
if (!TimeManagement::the().enable_profile_timer())
return ENOTSUP;
g_profiling_all_threads = true;
Process::for_each([](auto& process) {
PerformanceManager::add_process_created_event(process);
return IterationDecision::Continue;
});
g_profiling_all_threads = true;
return 0;
}