1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 18:15:09 +00:00

ProfileViewer: Highlight instructions with >0 samples in yellow

This commit is contained in:
Andreas Kling 2020-04-11 18:56:50 +02:00
parent 3a65e9107e
commit 68ddbc0084

View file

@ -103,6 +103,13 @@ GUI::Model::ColumnMetadata DisassemblyModel::column_metadata(int column) const
GUI::Variant DisassemblyModel::data(const GUI::ModelIndex& index, Role role) const GUI::Variant DisassemblyModel::data(const GUI::ModelIndex& index, Role role) const
{ {
auto& insn = m_instructions[index.row()]; auto& insn = m_instructions[index.row()];
if (role == Role::BackgroundColor) {
if (insn.event_count > 0)
return Color(Color::Yellow);
return {};
}
if (role == Role::Display) { if (role == Role::Display) {
if (index.column() == Column::SampleCount) { if (index.column() == Column::SampleCount) {
if (m_profile.show_percentages()) if (m_profile.show_percentages())