mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Kernel: Prune uninteresting kernel frames from profiling samples
Start capturing the sample stacks at the EIP/EBP of the pre-empted thread instead of capturing EBP in the sampling function itself.
This commit is contained in:
parent
bf0719092f
commit
647cfcb641
3 changed files with 12 additions and 5 deletions
|
@ -495,7 +495,7 @@ void Scheduler::timer_tick(const RegisterState& regs)
|
|||
if (current_thread->process().is_profiling()) {
|
||||
ASSERT(current_thread->process().perf_events());
|
||||
auto& perf_events = *current_thread->process().perf_events();
|
||||
[[maybe_unused]] auto rc = perf_events.append(PERF_EVENT_SAMPLE, 0, 0);
|
||||
[[maybe_unused]] auto rc = perf_events.append_with_eip_and_ebp(regs.eip, regs.ebp, PERF_EVENT_SAMPLE, 0, 0);
|
||||
}
|
||||
|
||||
if (current_thread->tick((regs.cs & 3) == 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue