1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:18:12 +00:00

UserspaceEmulator: Optionally generate a Profiler-compatible profile

`ue --profile --profile-file ~/some-file.profile id` can now generate a
full profile (instruction-by-instruction, if needed), at the cost of not
being able to see past the syscall boundary (a.la. callgrind).
This makes it significantly easier to profile seemingly fast userspace
things, like Loader.so :^)
This commit is contained in:
Ali Mohammad Pur 2021-08-05 22:42:31 +04:30 committed by Andreas Kling
parent 3829bf115c
commit 521217735b
4 changed files with 91 additions and 1 deletions

View file

@ -96,6 +96,9 @@ private:
void register_signal_handlers();
void setup_signal_trampoline();
void emit_profile_sample(AK::OutputStream&);
void emit_profile_event(AK::OutputStream&, StringView event_name, String contents);
int virt$emuctl(FlatPtr, FlatPtr, FlatPtr);
int virt$fork();
int virt$execve(FlatPtr);