mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibC: Allow opting into malloc() and free() performance event logging
If a program is started with LIBC_PROFILE_MALLOC in the environment, it will now generate PERF_EVENT_MALLOC and PERF_EVENT_FREE.
This commit is contained in:
parent
3879e5b9d4
commit
fa97ff1c83
4 changed files with 32 additions and 4 deletions
|
@ -79,4 +79,9 @@ int purge(int mode)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int perf_event(int type, uintptr_t arg1, uintptr_t arg2)
|
||||
{
|
||||
int rc = syscall(SC_perf_event, type, arg1, arg2);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue