mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
Kernel: Make sure we only log profiling events when m_profiling is true
Previously the process' m_profiling flag was ignored for all event types other than CPU samples. The kfree tracing code relies on temporarily disabling tracing during exec. This didn't work for per-process profiles and would instead panic. This updates the profiling code so that the m_profiling flag isn't ignored.
This commit is contained in:
parent
a8ca4751b9
commit
0688e02339
4 changed files with 15 additions and 16 deletions
|
@ -559,7 +559,12 @@ private:
|
|||
|
||||
inline PerformanceEventBuffer* current_perf_events_buffer()
|
||||
{
|
||||
return g_profiling_all_threads ? g_global_perf_events : m_perf_event_buffer.ptr();
|
||||
if (g_profiling_all_threads)
|
||||
return g_global_perf_events;
|
||||
else if (m_profiling)
|
||||
return m_perf_event_buffer.ptr();
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Process* m_prev { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue