mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
Do not fold recursions for symbols starting with "In file".
Sun Jun 1 23:03:06 2008 Søren Sandmann <sandmann@redhat.com> * profile.c (add_trace_to_tree): Do not fold recursions for symbols starting with "In file". * treeviewutils.c: Update copyright. Various formatting fixes. svn path=/trunk/; revision=427
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
5b6c578c1a
commit
736806aaa6
@ -1,3 +1,10 @@
|
|||||||
|
Sun Jun 1 23:03:06 2008 Søren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
|
* profile.c (add_trace_to_tree): Do not fold recursions for
|
||||||
|
symbols starting with "In file".
|
||||||
|
|
||||||
|
* treeviewutils.c: Update copyright. Various formatting fixes.
|
||||||
|
|
||||||
2008-04-30 Owen Taylor <otaylor@redhat.com>
|
2008-04-30 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* module/sysprof-module.c: Reorder the tests for
|
* module/sysprof-module.c: Reorder the tests for
|
||||||
|
|||||||
18
profile.c
18
profile.c
@ -232,6 +232,22 @@ profile_new (StackStash *stash)
|
|||||||
return profile;
|
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
|
static void
|
||||||
add_trace_to_tree (GList *trace, gint size, gpointer data)
|
add_trace_to_tree (GList *trace, gint size, gpointer data)
|
||||||
{
|
{
|
||||||
@ -260,7 +276,7 @@ add_trace_to_tree (GList *trace, gint size, gpointer data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!match)
|
if (!match && fold_recursion (address))
|
||||||
{
|
{
|
||||||
/* Have we seen this object further up the tree? */
|
/* Have we seen this object further up the tree? */
|
||||||
for (match = parent; match != NULL; match = match->parent)
|
for (match = parent; match != NULL; match = match->parent)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright 2003, 2004, Red Hat, Inc.
|
* Copyright 2003, 2004, Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* Sysprof -- Sampling, systemwide CPU profiler
|
* Sysprof -- Sampling, systemwide CPU profiler
|
||||||
* Copyright 2004, 2005, Soeren Sandmann
|
* Copyright 2004, 2005, 2006, 2007, 2008 Soeren Sandmann
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -32,10 +32,10 @@ typedef struct
|
|||||||
} SortInfo;
|
} SortInfo;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_sort_info (GtkTreeView *view,
|
set_sort_info (GtkTreeView *view,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
int model_column,
|
int model_column,
|
||||||
GtkSortType default_order)
|
GtkSortType default_order)
|
||||||
{
|
{
|
||||||
SortInfo *info;
|
SortInfo *info;
|
||||||
|
|
||||||
@ -56,7 +56,8 @@ get_sort_info (GtkTreeViewColumn *column)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkTreeViewColumn *
|
static GtkTreeViewColumn *
|
||||||
find_column_by_model_column (GtkTreeView *view, int model_column)
|
find_column_by_model_column (GtkTreeView *view,
|
||||||
|
int model_column)
|
||||||
{
|
{
|
||||||
GList *columns = gtk_tree_view_get_columns (view);
|
GList *columns = gtk_tree_view_get_columns (view);
|
||||||
GList *list;
|
GList *list;
|
||||||
@ -78,8 +79,8 @@ find_column_by_model_column (GtkTreeView *view, int model_column)
|
|||||||
|
|
||||||
void
|
void
|
||||||
tree_view_set_sort_column (GtkTreeView *view,
|
tree_view_set_sort_column (GtkTreeView *view,
|
||||||
int model_column,
|
int model_column,
|
||||||
int sort_type)
|
int sort_type)
|
||||||
{
|
{
|
||||||
GList *columns, *list;
|
GList *columns, *list;
|
||||||
GtkTreeSortable *sortable;
|
GtkTreeSortable *sortable;
|
||||||
|
|||||||
Reference in New Issue
Block a user