Commit 2062edcd authored by Milian Wolff's avatar Milian Wolff
Browse files

Exclude unresolved functions from recursion detection.

Previously, when we encountered a stack with two consecutive frames
with missing debug information, we thought it would indicate recursion
and then collapsed all frames beneath. Now, we exclude frames with
missing debug information and don't collapse the stacks anymore.
parent 2af66156
......@@ -271,7 +271,9 @@ void toGraphicsItems(const QVector<RowData>& data, FrameGraphicsItem* parent, in
const double costThreshold, bool collapseRecursion)
{
foreach (const auto& row, data) {
if (collapseRecursion && row.location->function == parent->function()) {
if (collapseRecursion && row.location->function != unresolvedFunctionName()
&& row.location->function == parent->function())
{
continue;
}
auto item = findItemByFunction(parent->childItems(), row.location->function);
......
......@@ -26,6 +26,8 @@
#include <boost/functional/hash.hpp>
#include <KLocalizedString>
struct LocationData
{
using Ptr = std::shared_ptr<LocationData>;
......@@ -58,6 +60,11 @@ struct LocationData
Q_DECLARE_TYPEINFO(LocationData, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(LocationData::Ptr)
inline QString unresolvedFunctionName()
{
return i18n("<unresolved function>");
}
inline bool operator<(const LocationData::Ptr& lhs, const LocationData& rhs)
{
return *lhs < rhs;
......
......@@ -43,7 +43,7 @@ struct StringCache
// TODO: support removal of template arguments
return stringify(ip.functionIndex);
} else {
return i18n("<unresolved function>");
return unresolvedFunctionName();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment