mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
Kernel: Move process creation perf events to PerformanceManager
This commit is contained in:
parent
ccdcb6a635
commit
8bf4201f50
4 changed files with 23 additions and 13 deletions
|
@ -13,8 +13,22 @@
|
|||
namespace Kernel {
|
||||
|
||||
class PerformanceManager {
|
||||
|
||||
public:
|
||||
inline static void add_process_created_event(Process& process)
|
||||
{
|
||||
if (g_profiling_all_threads) {
|
||||
VERIFY(g_global_perf_events);
|
||||
g_global_perf_events->add_process(process, ProcessEventType::Create);
|
||||
}
|
||||
}
|
||||
|
||||
inline static void add_process_exec_event(Process& process)
|
||||
{
|
||||
if (auto* event_buffer = process.current_perf_events_buffer()) {
|
||||
event_buffer->add_process(process, ProcessEventType::Exec);
|
||||
}
|
||||
}
|
||||
|
||||
inline static void add_thread_created_event(Thread& thread)
|
||||
{
|
||||
if (auto* event_buffer = thread.process().current_perf_events_buffer()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue