[sysprof] Update TODO



commit a33678df2617275fb60588776d8e020f37907ecc
Author: Søren Sandmann Pedersen <ssp redhat com>
Date:   Mon Sep 14 04:59:28 2009 -0400

    Update TODO

 TODO      |   38 ++++++++++++++++++++++++++------------
 binfile.c |   32 ++++++++++++++++----------------
 binfile.h |   20 ++++++++++----------
 sysprof.c |    2 +-
 tracker.c |    8 ++++----
 5 files changed, 57 insertions(+), 43 deletions(-)
---
diff --git a/TODO b/TODO
index 88bbb77..4748b65 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,10 @@
+Before 1.1:
+
+* Move perfcounter.h into sysprof namespace
+
+* Check for existence and presense of __NR_perf_counter_open in
+  syscall.h
+
 Before 1.2:
 
 * Build system
@@ -9,8 +16,8 @@ Before 1.2:
 
      Someone already did create a package - should be googlable.
 
-* The hrtimer in the kernel currently generate an event every time the
-  timer fires. There are two problems with this:
+* The hrtimer in the kernel currently generates an event every time
+  the timer fires. There are two problems with this:
 
   - Essentially all the events are idle events and exclude_idle is
     ignored.
@@ -55,6 +62,9 @@ Before 1.2:
   events compare equal, unless both have the same pid and one is a
   fork and the other is not.
 
+  A system-wide serial number could be expensive to maintain though,
+  so maybe time events would be just as good.
+
 * Another issue is processes that exit during the initial scan of
   /proc. Such a process will not cause sample events by itself, but it
   may fork a child that will. There is no way to get maps for that
@@ -116,7 +126,7 @@ Before 1.2:
 
 * Why do we get EINVAL when we try to track forks?
 
-* Sometimes it get samples for unknown processes. This may be due to
+* Sometimes it gets samples for unknown processes. This may be due to
   forking without execing.
 
 * Give an informative error message if not run as root
@@ -626,7 +636,7 @@ http://www.linuxbase.org/spec/booksets/LSB-Embedded/LSB-Embedded/ehframe.html
 	- Possibly a special "view details" mode, assuming that 
 	  the details of a function are not that interesting 
 	  together with a tree. (Could add radio buttons somewhere in
-	  in the right pane).
+	  in the right pane). Or tabs.
   	- Open a new window for the function.
 
 - Add view->ancestors/descendants menu items
@@ -782,14 +792,18 @@ Later:
    Cookies are used to figure out whether an access is really the same, ie., for two identical
    cookies, the size is still just one, however 
    
-   Memory is different from disk because you can't reasonably assume that stuff that has
-   been read will stay in cache (for short profile runs you can assume that with disk,
-   but not for long ones).
-
-   - Perhaps show a timeline with CPU in one color and disk in one color. Allow people to
-     look at at subintervals of this timeline. Is it useful to look at both CPU and disk at 
-     the same time? Probably not. See also marker discussion above. UI should probably allow
-     double clicking on a marked section and all instances of that one would be marked.
+   Memory is different from disk because you can't reasonably assume
+   that stuff that has been read will stay in cache (for short profile
+   runs you can assume that with disk, but not for long ones).
+
+   - Perhaps show a timeline with CPU in one color and disk in one
+     color. Allow people to look at at subintervals of this
+     timeline. Is it useful to look at both CPU and disk at the same
+     time? Probably not. See also marker discussion above. UI should
+     probably allow double clicking on a marked section and all
+     instances of that one would be marked.
+
+   - This also allows us to show how well multicore CPUs are being used.
 
    - Other variation on the timeline idea: Instead of a disk timeline you could have a 
      list of individual diskaccesses, and be able to select the ones you wanted to
diff --git a/binfile.c b/binfile.c
index 135f1ab..be79594 100644
--- a/binfile.c
+++ b/binfile.c
@@ -38,7 +38,7 @@
 #include "binfile.h"
 #include "elfparser.h"
 
-struct BinFile
+struct bin_file_t
 {
     int		ref_count;
     
@@ -325,13 +325,13 @@ get_vdso_bytes (size_t *length)
     return bytes;
 }
 
-BinFile *
+bin_file_t *
 bin_file_new (const char *filename)
 {
     ElfParser *elf = NULL;
-    BinFile *bf;
+    bin_file_t *bf;
     
-    bf = g_new0 (BinFile, 1);
+    bf = g_new0 (bin_file_t, 1);
     
     bf->inode_check = FALSE;
     bf->filename = g_strdup (filename);
@@ -371,7 +371,7 @@ bin_file_new (const char *filename)
 }
 
 void
-bin_file_free (BinFile *bin_file)
+bin_file_free (bin_file_t *bin_file)
 {
     if (--bin_file->ref_count == 0)
     {
@@ -384,8 +384,8 @@ bin_file_free (BinFile *bin_file)
     }
 }
 
-const BinSymbol *
-bin_file_lookup_symbol (BinFile    *bin_file,
+const bin_symbol_t *
+bin_file_lookup_symbol (bin_file_t    *bin_file,
 			gulong      address)
 {
     GList *list;
@@ -413,7 +413,7 @@ bin_file_lookup_symbol (BinFile    *bin_file,
 	    g_print ("found  %lx => %s\n", address,
 		     bin_symbol_get_name (bin_file, sym));
 #endif
-	    return (const BinSymbol *)sym;
+	    return (const bin_symbol_t *)sym;
 	}
     }
     
@@ -424,11 +424,11 @@ bin_file_lookup_symbol (BinFile    *bin_file,
 	     bin_file->text_offset);
 #endif
     
-    return (const BinSymbol *)bin_file->undefined_name;
+    return (const bin_symbol_t *)bin_file->undefined_name;
 }
 
 gboolean
-bin_file_check_inode (BinFile *bin_file,
+bin_file_check_inode (bin_file_t *bin_file,
 		      ino_t    inode)
 {
     if (bin_file->inode == inode)
@@ -450,8 +450,8 @@ bin_file_check_inode (BinFile *bin_file,
 }
 
 static const ElfSym *
-get_elf_sym (BinFile *file,
-	     const BinSymbol *symbol,
+get_elf_sym (bin_file_t *file,
+	     const bin_symbol_t *symbol,
 	     ElfParser **elf_ret)
 {
     GList *list;
@@ -475,8 +475,8 @@ get_elf_sym (BinFile *file,
 }
 
 const char *
-bin_symbol_get_name (BinFile *file,
-		     const BinSymbol *symbol)
+bin_symbol_get_name (bin_file_t *file,
+		     const bin_symbol_t *symbol)
 {
     if (file->undefined_name == (char *)symbol)
     {
@@ -494,8 +494,8 @@ bin_symbol_get_name (BinFile *file,
 }
 
 gulong
-bin_symbol_get_address (BinFile         *file,
-			const BinSymbol *symbol)
+bin_symbol_get_address (bin_file_t      *file,
+			const bin_symbol_t *symbol)
 {
     if (file->undefined_name == (char *)symbol)
     {
diff --git a/binfile.h b/binfile.h
index 44dbbb6..03c3a41 100644
--- a/binfile.h
+++ b/binfile.h
@@ -27,20 +27,20 @@
 #include <glib.h>
 #include <sys/types.h>
 
-typedef struct BinFile BinFile;
-typedef struct BinSymbol BinSymbol;
+typedef struct bin_file_t bin_file_t;
+typedef struct bin_symbol_t bin_symbol_t;
 
 /* Binary File */
 
-BinFile *        bin_file_new           (const char      *filename);
-void             bin_file_free          (BinFile         *bin_file);
-const BinSymbol *bin_file_lookup_symbol (BinFile         *bin_file,
+bin_file_t *        bin_file_new           (const char      *filename);
+void             bin_file_free          (bin_file_t         *bin_file);
+const bin_symbol_t *bin_file_lookup_symbol (bin_file_t         *bin_file,
 					 gulong           address);
-gboolean         bin_file_check_inode   (BinFile         *bin_file,
+gboolean         bin_file_check_inode   (bin_file_t         *bin_file,
 					 ino_t		  inode);
-const char *     bin_symbol_get_name    (BinFile         *bin_file,
-					 const BinSymbol *symbol);
-gulong		 bin_symbol_get_address (BinFile         *bin_file,
-					 const BinSymbol *symbol);
+const char *     bin_symbol_get_name    (bin_file_t         *bin_file,
+					 const bin_symbol_t *symbol);
+gulong		 bin_symbol_get_address (bin_file_t         *bin_file,
+					 const bin_symbol_t *symbol);
 
 #endif
diff --git a/sysprof.c b/sysprof.c
index d254908..5fed994 100644
--- a/sysprof.c
+++ b/sysprof.c
@@ -972,7 +972,7 @@ expand_descendants_tree (Application *app)
 		GTK_TREE_VIEW (app->descendants_view), best_path, FALSE);
 	    n_rows += n_children;
 
-	    if (gtk_tree_path_get_depth (best_path) < 6)
+	    if (gtk_tree_path_get_depth (best_path) < 4)
 	    {
 		GtkTreePath *path = gtk_tree_path_copy (best_path);
 		gtk_tree_path_down (path);
diff --git a/tracker.c b/tracker.c
index 47d92be..a8e52a0 100644
--- a/tracker.c
+++ b/tracker.c
@@ -795,10 +795,10 @@ make_message (state_t *state, const char *format, ...)
     return result;
 }
 
-static BinFile *
+static bin_file_t *
 state_get_bin_file (state_t *state, const char *filename)
 {
-    BinFile *bf = g_hash_table_lookup (state->bin_files, filename);
+    bin_file_t *bf = g_hash_table_lookup (state->bin_files, filename);
 
     if (!bf)
     {
@@ -834,8 +834,8 @@ lookup_symbol (state_t    *state,
 	}
 	else
 	{
-	    BinFile *bin_file = state_get_bin_file (state, map->filename);
-	    const BinSymbol *bin_sym;
+	    bin_file_t *bin_file = state_get_bin_file (state, map->filename);
+	    const bin_symbol_t *bin_sym;
 	    
 	    address -= map->start;
 	    address += map->offset;



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