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

Profiler: Remove ability to filter Kernel::Scheduler::yield() frames

Hiding those frames doesn't really make sense. They're a major
contributor to a process' spent CPU time and show up in a lot of
profiles. That however is because those processes really do spend
quite a bit of time in the scheduler by doing lots of context
switches, like WindowServer when responding to IPC calls.

Instead of hiding these for aesthetic reasons we should instead
improve the scheduler.
This commit is contained in:
Gunnar Beutner 2021-05-18 10:17:47 +02:00 committed by Andreas Kling
parent 7dc77bd833
commit 6ac1ca5a9a
4 changed files with 0 additions and 34 deletions

View file

@ -99,12 +99,6 @@ void Profile::rebuild_tree()
if (!process_filter_contains(event.pid, event.timestamp))
continue;
if (!m_show_scheduler && !event.frames.is_empty()) {
const auto& top_frame = event.frames[event.frames.size() - 1];
if (top_frame.symbol == "Kernel::Scheduler::yield()"sv)
continue;
}
m_filtered_event_indices.append(event_index);
if (event.type == "malloc"sv && !live_allocations.contains(event.ptr))
@ -459,15 +453,6 @@ void Profile::set_show_percentages(bool show_percentages)
m_show_percentages = show_percentages;
}
void Profile::set_show_scheduler(bool show_scheduler)
{
if (m_show_scheduler == show_scheduler)
return;
m_show_scheduler = show_scheduler;
// FIXME: This only works when kernel symbols are available
rebuild_tree();
}
void Profile::set_disassembly_index(const GUI::ModelIndex& index)
{
if (m_disassembly_index == index)