1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

Kernel: Include the current instruction pointer in profile samples

We were missing the innermost instruction pointer when sampling.
This makes the instruction-level profile info a lot cooler! :^)
This commit is contained in:
Andreas Kling 2020-04-11 20:39:27 +02:00
parent c106451daf
commit b7ff3b5ad1
4 changed files with 7 additions and 6 deletions

View file

@ -603,7 +603,7 @@ void Scheduler::timer_tick(const RegisterState& regs)
if (Process::current->is_profiling()) {
SmapDisabler disabler;
auto backtrace = Thread::current->raw_backtrace(regs.ebp);
auto backtrace = Thread::current->raw_backtrace(regs.ebp, regs.eip);
auto& sample = Profiling::next_sample_slot();
sample.pid = Process::current->pid();
sample.tid = Thread::current->tid();