mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:18:12 +00:00
Kernel+LibC: Add support for filtering profiling events
This adds the -t command-line argument for the profile tool. Using this argument you can filter which event types you want in your profile.
This commit is contained in:
parent
8b2ace0326
commit
572bbf28cc
10 changed files with 72 additions and 33 deletions
|
@ -60,6 +60,9 @@ KResult PerformanceEventBuffer::append_with_eip_and_ebp(ProcessID pid, ThreadID
|
|||
if (count() >= capacity())
|
||||
return ENOBUFS;
|
||||
|
||||
if ((g_profiling_event_mask & type) == 0)
|
||||
return EINVAL;
|
||||
|
||||
PerformanceEvent event;
|
||||
event.type = type;
|
||||
event.lost_samples = lost_samples;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue