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

Profiler: Add ability to process read syscalls

Profiler can now process and display read events.
This commit is contained in:
Jakub Berkop 2022-02-12 16:58:01 +01:00 committed by Andreas Kling
parent fae991f599
commit cdfb388154
4 changed files with 28 additions and 1 deletions

View file

@ -48,6 +48,8 @@ String SamplesModel::column_name(int column) const
return "Lost Samples";
case Column::InnermostStackFrame:
return "Innermost Frame";
case Column::Path:
return "Path";
default:
VERIFY_NOT_REACHED();
}
@ -89,6 +91,13 @@ GUI::Variant SamplesModel::data(GUI::ModelIndex const& index, GUI::ModelRole rol
if (index.column() == Column::InnermostStackFrame) {
return event.frames.last().symbol;
}
if (index.column() == Column::Path) {
if (!event.data.has<Profile::Event::ReadData>())
return "";
return event.data.get<Profile::Event::ReadData>().path;
}
return {};
}
return {};