From 3cafdca86885bd86a7875a60a6d97a9ed3b60d32 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 17 May 2021 15:28:46 +0200 Subject: [PATCH] Kernel: Disable profile timer when the process exits When profiling a single process we didn't disable the profile timer. enable_profile_timer()/disable_profiler_timer() support nested calls so no special care has to be taken here to only disable the timer when nobody else is using it. --- Kernel/Process.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index b6d922f7a0..d2a1eaca8c 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -492,8 +492,10 @@ void Process::finalize() if (is_dumpable()) { if (m_should_dump_core) dump_core(); - if (m_perf_event_buffer) + if (m_perf_event_buffer) { dump_perfcore(); + TimeManagement::the().disable_profile_timer(); + } } m_threads_for_coredump.clear();