[sysprof] Make stack_stash_add_trace() return a pointer to the trace



commit 3395b317ab2d58a44e041aed327ea31be8519220
Author: Søren Sandmann Pedersen <ssp redhat com>
Date:   Mon Sep 7 15:55:45 2009 -0400

    Make stack_stash_add_trace() return a pointer to the trace

 stackstash.c |    6 ++++--
 stackstash.h |    2 +-
 sysprof.c    |    4 ++--
 3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/stackstash.c b/stackstash.c
index fd40958..8c06f7b 100644
--- a/stackstash.c
+++ b/stackstash.c
@@ -199,7 +199,7 @@ stack_stash_free (StackStash *stash)
     g_free (stash);
 }
 
-void
+StackNode *
 stack_stash_add_trace (StackStash *stash,
 		       uint64_t   *addrs,
 		       int         n_addrs,
@@ -210,7 +210,7 @@ stack_stash_add_trace (StackStash *stash,
     int i;
 
     if (!n_addrs)
-	return;
+	return NULL;
 
     if (stash->nodes_by_data)
 	stack_stash_undecorate (stash);
@@ -253,6 +253,8 @@ stack_stash_add_trace (StackStash *stash,
     }
 
     parent->size += size;
+
+    return parent;
 }
 
 static void
diff --git a/stackstash.h b/stackstash.h
index c1cc398..4fad001 100644
--- a/stackstash.h
+++ b/stackstash.h
@@ -62,7 +62,7 @@ typedef void (* StackNodeFunc) (StackNode *node,
 /* Stach */
 StackStash *stack_stash_new                (GDestroyNotify  destroy);
 StackNode * stack_node_new                 (StackStash     *stash);
-void        stack_stash_add_trace          (StackStash     *stash,
+StackNode * stack_stash_add_trace          (StackStash     *stash,
 					    uint64_t       *addrs,
 					    gint            n_addrs,
 					    int             size);
diff --git a/sysprof.c b/sysprof.c
index 78e8864..fd689b7 100644
--- a/sysprof.c
+++ b/sysprof.c
@@ -272,7 +272,7 @@ set_busy (GtkWidget *widget,
     if (cursor)
 	gdk_cursor_unref (cursor);
 
-    gdk_display_flush (gdk_display_get_default());
+    gdk_display_sync (gdk_display_get_default());
 }
 
 static void
@@ -506,7 +506,7 @@ add_node (FooTreeStore      *store,
 static void
 fill_descendants_tree (Application *app)
 {
-    GtkTreeStore *tree_store;
+    FooTreeStore *tree_store;
 
     if (app->descendants)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]