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.
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);
#include <boost/functional/hash.hpp>
+#include <KLocalizedString>
+
struct LocationData
{
using Ptr = std::shared_ptr<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;
// TODO: support removal of template arguments
return stringify(ip.functionIndex);
} else {
- return i18n("<unresolved function>");
+ return unresolvedFunctionName();
}
}