+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
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.
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
* 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
- 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
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
#include "binfile.h"
#include "elfparser.h"
-struct BinFile
+struct bin_file_t
{
int ref_count;
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);
}
void
-bin_file_free (BinFile *bin_file)
+bin_file_free (bin_file_t *bin_file)
{
if (--bin_file->ref_count == 0)
{
}
}
-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;
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;
}
}
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)
}
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;
}
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)
{
}
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)
{
#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
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);
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)
{
}
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;