Get rid of hack to not fold recursions for "In file" symbols

This commit is contained in:
Søren Sandmann Pedersen
2009-02-21 22:48:04 -05:00
parent fcfd231cb5
commit 5143df4e72

View File

@ -232,22 +232,6 @@ profile_new (StackStash *stash)
return profile;
}
static gboolean
fold_recursion (gpointer address)
{
/* This is a hack.
*
* The correct way to do it would be to have the address
* be a pointer to more information about the symbol; that
* way we could also do things like change the font.
*
* The problem with that is that we can't compatibly add
* this information to saved files, and we can't compute it
* without access to the processes who generated it.
*/
return strncmp (address, "In file", 7) != 0;
}
static void
add_trace_to_tree (GList *trace, gint size, gpointer data)
{
@ -276,7 +260,7 @@ add_trace_to_tree (GList *trace, gint size, gpointer data)
}
}
if (!match && fold_recursion (address))
if (!match)
{
/* Have we seen this object further up the tree? */
for (match = parent; match != NULL; match = match->parent)