1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:57:34 +00:00

Profiler: Let the user ignore context switches

Now that the profiling timer is independent from the scheduler the
user will get quite a few CPU samples from "within" the scheduler.
These events are less useful when just profiling a user-mode process
rather than the whole system. This patch adds an option to Profiler to
hide these events.
This commit is contained in:
Gunnar Beutner 2021-05-13 22:11:44 +02:00 committed by Andreas Kling
parent c534f176bc
commit d6b3513aab
4 changed files with 34 additions and 0 deletions

View file

@ -196,6 +196,9 @@ public:
bool show_percentages() const { return m_show_percentages; }
void set_show_percentages(bool);
bool show_scheduler() const { return m_show_scheduler; }
void set_show_scheduler(bool);
const Vector<Process>& processes() const { return m_processes; }
template<typename Callback>
@ -240,6 +243,7 @@ private:
bool m_inverted { false };
bool m_show_top_functions { false };
bool m_show_percentages { false };
bool m_show_scheduler { true };
};
}