Skip to content

Commit

Permalink
Kernel: Disable profile timer when the process exits
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gunnarbeutner authored and awesomekling committed May 17, 2021
1 parent 52a4a1e commit 3cafdca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Kernel/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3cafdca

Please sign in to comment.