sysprof r427 - trunk
- From: ssp svn gnome org
- To: svn-commits-list gnome org
- Subject: sysprof r427 - trunk
- Date: Mon, 2 Jun 2008 03:17:27 +0000 (UTC)
Author: ssp
Date: Mon Jun 2 03:17:27 2008
New Revision: 427
URL: http://svn.gnome.org/viewvc/sysprof?rev=427&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/profile.c
trunk/treeviewutils.c
Modified: trunk/profile.c
==============================================================================
--- trunk/profile.c (original)
+++ trunk/profile.c Mon Jun 2 03:17:27 2008
@@ -232,6 +232,22 @@
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)
{
@@ -244,7 +260,7 @@
gpointer address = list->data;
ProfileDescendant *prev = NULL;
ProfileDescendant *match = NULL;
-
+
for (match = *tree; match != NULL; prev = match, match = match->siblings)
{
if (match->name == address)
@@ -260,7 +276,7 @@
}
}
- if (!match)
+ if (!match && fold_recursion (address))
{
/* Have we seen this object further up the tree? */
for (match = parent; match != NULL; match = match->parent)
Modified: trunk/treeviewutils.c
==============================================================================
--- trunk/treeviewutils.c (original)
+++ trunk/treeviewutils.c Mon Jun 2 03:17:27 2008
@@ -3,7 +3,7 @@
* Copyright 2003, 2004, Red Hat, Inc.
*
* 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
* it under the terms of the GNU General Public License as published by
@@ -32,10 +32,10 @@
} SortInfo;
static void
-set_sort_info (GtkTreeView *view,
- GtkTreeViewColumn *column,
- int model_column,
- GtkSortType default_order)
+set_sort_info (GtkTreeView *view,
+ GtkTreeViewColumn *column,
+ int model_column,
+ GtkSortType default_order)
{
SortInfo *info;
@@ -56,7 +56,8 @@
}
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 *list;
@@ -78,8 +79,8 @@
void
tree_view_set_sort_column (GtkTreeView *view,
- int model_column,
- int sort_type)
+ int model_column,
+ int sort_type)
{
GList *columns, *list;
GtkTreeSortable *sortable;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]