1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

Kernel: Log thread exits for global profiles

This commit is contained in:
Gunnar Beutner 2021-04-26 23:07:30 +02:00 committed by Andreas Kling
parent afeee35cbf
commit 1c02848e54

View file

@ -89,8 +89,8 @@ void Process::sys$exit_thread(Userspace<void*> exit_value)
this->sys$exit(0);
}
if (m_perf_event_buffer) {
[[maybe_unused]] auto rc = m_perf_event_buffer->append(PERF_EVENT_THREAD_EXIT, Thread::current()->tid().value(), 0, nullptr);
if (auto* event_buffer = current_perf_events_buffer()) {
[[maybe_unused]] auto rc = event_buffer->append(PERF_EVENT_THREAD_EXIT, Thread::current()->tid().value(), 0, nullptr);
}
Thread::current()->exit(reinterpret_cast<void*>(exit_value.ptr()));