mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +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
|
@ -56,4 +56,9 @@ int futex(int32_t* userspace_address, int futex_op, int32_t value, const struct
|
|||
|
||||
int purge(int mode);
|
||||
|
||||
#define PERF_EVENT_MALLOC 1
|
||||
#define PERF_EVENT_FREE 2
|
||||
|
||||
int perf_event(int type, uintptr_t arg1, uintptr_t arg2);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue