Fix small bug in add_timeout() More descriptive tree labels update
authorSoeren Sandmann <sandmann@redhat.com>
Sat, 12 Mar 2005 16:05:58 +0000 (16:05 +0000)
committerSøren Sandmann Pedersen <ssp@src.gnome.org>
Sat, 12 Mar 2005 16:05:58 +0000 (16:05 +0000)
Sat Mar 12 11:05:19 2005  Soeren Sandmann  <sandmann@redhat.com>

* sysprof-module.c: Fix small bug in add_timeout()
* sysprof.c (build_gui): More descriptive tree labels
* TODO: update

ChangeLog
TODO
sfile.c
sfile.h
sysprof-module.c
sysprof.c

index 8447df7..f1be485 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Mar 12 11:05:19 2005  Soeren Sandmann  <sandmann@redhat.com>
+
+       * sysprof-module.c: Fix small bug in add_timeout()
+       * sysprof.c (build_gui): More descriptive tree labels
+       * TODO: update
+
 Thu Mar 10 16:37:52 2005  Søren Sandmann  <sandmann@redhat.com>
 
        * sysprof.c (build_gui): s/Cummulative/Cumulative/. Pointed out by
diff --git a/TODO b/TODO
index e303ace..3e1c6eb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,5 @@
 - crashes when you ctrl-click the selected item in the top left pane
    <ian__> ssp: looks like it doesn't handle the none-selected case
-   <ian__> Better labels would be useful
 
 - consider caching [filename => bin_file]
 - Have kernel modulereport the file the symbol was found in
@@ -8,7 +7,7 @@
 - grep FIXME
 - hide internal stuff in ProfileDescendant
 - add an 'everything' object. It _is_ really needed for a lot of things
-
+- in timer, put process to sleep. Should get us more accurate data
 - loading and saving
 
 - make profile.c more agnostic to processes and functions etc. Ideally
diff --git a/sfile.c b/sfile.c
index 760eeb9..f75b400 100644 (file)
--- a/sfile.c
+++ b/sfile.c
@@ -18,6 +18,7 @@ struct SFormat
 
 enum
 {
+    TYPE_UNDEFINED = 0,
     TYPE_POINTER,
     TYPE_STRING,
     TYPE_INTEGER,
diff --git a/sfile.h b/sfile.h
index 6a6e936..72e39af 100644 (file)
--- a/sfile.h
+++ b/sfile.h
@@ -19,6 +19,13 @@ typedef guint SType;
  * serializer_write_int ();
  * serializer_end_write (..., GError **err);
  *
+ *
+ *  For formats consider:
+ *
+ *   Format *format_new (void);
+ *   void format_new_record (Format *f, Record *r);
+ *   
+ *   
  */
 
 /* - Describing Types - */
index 67301f3..940d54c 100644 (file)
@@ -42,7 +42,6 @@ static struct timer_list timer;
 static void
 init_timeout (void)
 {
-       timer.function = on_timer;
        init_timer(&timer);
 }
 
@@ -56,6 +55,7 @@ static void
 add_timeout(unsigned int interval,
            TimeoutFunc  f)
 {
+       timer.function = f;
        mod_timer(&timer, jiffies + INTERVAL);
 }
 
@@ -79,7 +79,7 @@ init_userspace_reader (userspace_reader *reader,
 }
 
 /* This is mostly cutted and pasted from ptrace.c
- * I removed some locking and other stuff though. I hope it
+ * I removed some locking and stuff though. I hope it
  * wasn't important.
  */
 
@@ -303,22 +303,14 @@ static void
 on_timer(unsigned long dong)
 {
 #if 0
-       struct task_struct *p;
-#endif
-
        static const int cpu_profiler = 1; /* set to 0 to profile disk */
 
-       if (current && current->pid != 0) {
-#if 0
-       
-       for_each_process (p) {
-               if (p->state == (cpu_profiler? TASK_RUNNING : TASK_UNINTERRUPTIBLE)) {
+       if (p->state == (cpu_profiler? TASK_RUNNING : TASK_UNINTERRUPTIBLE))
+               ;
 #endif
-                       queue_generate_stack_trace (current);
-#if 0
-               }
-#endif
-       }
+
+       if (current && current->pid != 0)
+               queue_generate_stack_trace (current);
        
        add_timeout (INTERVAL, on_timer);
 }
index 2883d60..3b21579 100644 (file)
--- a/sysprof.c
+++ b/sysprof.c
@@ -869,7 +869,7 @@ build_gui (Application *app)
     
     /* object view */
     app->object_view = (GtkTreeView *)glade_xml_get_widget (xml, "object_view");
-    col = add_plain_text_column (app->object_view, _("Name"), OBJECT_NAME);
+    col = add_plain_text_column (app->object_view, _("Functions"), OBJECT_NAME);
     add_double_format_column (app->object_view, _("Self"), OBJECT_SELF, "%.2f");
     add_double_format_column (app->object_view, _("Total"), OBJECT_TOTAL, "%.2f");
     selection = gtk_tree_view_get_selection (app->object_view);
@@ -879,7 +879,7 @@ build_gui (Application *app)
     
     /* callers view */
     app->callers_view = (GtkTreeView *)glade_xml_get_widget (xml, "callers_view");
-    col = add_plain_text_column (app->callers_view, _("Name"), CALLERS_NAME);
+    col = add_plain_text_column (app->callers_view, _("Callers"), CALLERS_NAME);
     add_double_format_column (app->callers_view, _("Self"), CALLERS_SELF, "%.2f");
     add_double_format_column (app->callers_view, _("Total"), CALLERS_TOTAL, "%.2f");
     g_signal_connect (app->callers_view, "row-activated",
@@ -889,7 +889,7 @@ build_gui (Application *app)
     
     /* descendants view */
     app->descendants_view = (GtkTreeView *)glade_xml_get_widget (xml, "descendants_view");
-    col = add_plain_text_column (app->descendants_view, _("Name"), DESCENDANTS_NAME);
+    col = add_plain_text_column (app->descendants_view, _("Descendants"), DESCENDANTS_NAME);
     add_double_format_column (app->descendants_view, _("Self"), DESCENDANTS_SELF, "%.2f");
     add_double_format_column (app->descendants_view, _("Cumulative"), DESCENDANTS_NON_RECURSE, "%.2f");
     g_signal_connect (app->descendants_view, "row-activated",