mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +00:00
Profiler: Show the symbol address in object file
This commit is contained in:
parent
64ccf2196c
commit
4bef63fa6a
2 changed files with 11 additions and 0 deletions
|
@ -86,6 +86,8 @@ String ProfileModel::column_name(int column) const
|
||||||
return "Object";
|
return "Object";
|
||||||
case Column::StackFrame:
|
case Column::StackFrame:
|
||||||
return "Stack Frame";
|
return "Stack Frame";
|
||||||
|
case Column::SymbolAddress:
|
||||||
|
return "Symbol Address";
|
||||||
default:
|
default:
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
return {};
|
return {};
|
||||||
|
@ -130,6 +132,14 @@ GUI::Variant ProfileModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
|
||||||
}
|
}
|
||||||
return node->symbol();
|
return node->symbol();
|
||||||
}
|
}
|
||||||
|
if (index.column() == Column::SymbolAddress) {
|
||||||
|
if (node->is_root())
|
||||||
|
return "";
|
||||||
|
auto library = node->process().library_metadata.library_containing(node->address());
|
||||||
|
if (!library)
|
||||||
|
return "";
|
||||||
|
return String::formatted("{:p} (offset {:p})", node->address(), node->address() - library->base);
|
||||||
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
|
|
|
@ -24,6 +24,7 @@ public:
|
||||||
SelfCount,
|
SelfCount,
|
||||||
ObjectName,
|
ObjectName,
|
||||||
StackFrame,
|
StackFrame,
|
||||||
|
SymbolAddress,
|
||||||
__Count
|
__Count
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue