Kernel+Profiler: Track lost time between profiler timer ticks

We can lose profiling timer events for a few reasons, for example
disabled interrupts or system slowness. This accounts for lost
time between CPU samples by adding a field lost_samples to each
profiling event which tracks how many samples were lost immediately
preceding the event.
This commit is contained in:
Gunnar Beutner
2021-05-13 22:14:07 +02:00
committed by Andreas Kling
parent 8614d18956
commit c41f13f10b
8 changed files with 30 additions and 11 deletions

View File

@@ -45,6 +45,8 @@ String SamplesModel::column_name(int column) const
return "TID";
case Column::ExecutableName:
return "Executable";
case Column::LostSamples:
return "Lost Samples";
case Column::InnermostStackFrame:
return "Innermost Frame";
default:
@@ -81,6 +83,10 @@ GUI::Variant SamplesModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
return (u32)event.timestamp;
}
if (index.column() == Column::LostSamples) {
return event.lost_samples;
}
if (index.column() == Column::InnermostStackFrame) {
return event.frames.last().symbol;
}