summaryrefslogtreecommitdiff
path: root/Kernel/Scheduler.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-11 20:39:27 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-11 21:04:45 +0200
commitb7ff3b5ad18001abf19c1b3edb45096b0219d467 (patch)
tree42e18a591d93a0794c797a4639e817b752803ff7 /Kernel/Scheduler.cpp
parentc106451daf76ce05592fa6f8226df9002ab531c0 (diff)
downloadserenity-b7ff3b5ad18001abf19c1b3edb45096b0219d467.zip
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! :^)
Diffstat (limited to 'Kernel/Scheduler.cpp')
-rw-r--r--Kernel/Scheduler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp
index 163705025d..6563effc3f 100644
--- a/Kernel/Scheduler.cpp
+++ b/Kernel/Scheduler.cpp
@@ -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();