mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
Update TODO
This commit is contained in:
36
TODO
36
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:
|
Before 1.2:
|
||||||
|
|
||||||
* Build system
|
* Build system
|
||||||
@ -9,8 +16,8 @@ Before 1.2:
|
|||||||
|
|
||||||
Someone already did create a package - should be googlable.
|
Someone already did create a package - should be googlable.
|
||||||
|
|
||||||
* The hrtimer in the kernel currently generate an event every time the
|
* The hrtimer in the kernel currently generates an event every time
|
||||||
timer fires. There are two problems with this:
|
the timer fires. There are two problems with this:
|
||||||
|
|
||||||
- Essentially all the events are idle events and exclude_idle is
|
- Essentially all the events are idle events and exclude_idle is
|
||||||
ignored.
|
ignored.
|
||||||
@ -55,6 +62,9 @@ Before 1.2:
|
|||||||
events compare equal, unless both have the same pid and one is a
|
events compare equal, unless both have the same pid and one is a
|
||||||
fork and the other is not.
|
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
|
* Another issue is processes that exit during the initial scan of
|
||||||
/proc. Such a process will not cause sample events by itself, but it
|
/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
|
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?
|
* 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.
|
forking without execing.
|
||||||
|
|
||||||
* Give an informative error message if not run as root
|
* 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
|
- Possibly a special "view details" mode, assuming that
|
||||||
the details of a function are not that interesting
|
the details of a function are not that interesting
|
||||||
together with a tree. (Could add radio buttons somewhere in
|
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.
|
- Open a new window for the function.
|
||||||
|
|
||||||
- Add view->ancestors/descendants menu items
|
- 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 are used to figure out whether an access is really the same, ie., for two identical
|
||||||
cookies, the size is still just one, however
|
cookies, the size is still just one, however
|
||||||
|
|
||||||
Memory is different from disk because you can't reasonably assume that stuff that has
|
Memory is different from disk because you can't reasonably assume
|
||||||
been read will stay in cache (for short profile runs you can assume that with disk,
|
that stuff that has been read will stay in cache (for short profile
|
||||||
but not for long ones).
|
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
|
- Perhaps show a timeline with CPU in one color and disk in one
|
||||||
look at at subintervals of this timeline. Is it useful to look at both CPU and disk at
|
color. Allow people to look at at subintervals of this
|
||||||
the same time? Probably not. See also marker discussion above. UI should probably allow
|
timeline. Is it useful to look at both CPU and disk at the same
|
||||||
double clicking on a marked section and all instances of that one would be marked.
|
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
|
- 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
|
list of individual diskaccesses, and be able to select the ones you wanted to
|
||||||
|
|||||||
32
binfile.c
32
binfile.c
@ -38,7 +38,7 @@
|
|||||||
#include "binfile.h"
|
#include "binfile.h"
|
||||||
#include "elfparser.h"
|
#include "elfparser.h"
|
||||||
|
|
||||||
struct BinFile
|
struct bin_file_t
|
||||||
{
|
{
|
||||||
int ref_count;
|
int ref_count;
|
||||||
|
|
||||||
@ -325,13 +325,13 @@ get_vdso_bytes (size_t *length)
|
|||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
BinFile *
|
bin_file_t *
|
||||||
bin_file_new (const char *filename)
|
bin_file_new (const char *filename)
|
||||||
{
|
{
|
||||||
ElfParser *elf = NULL;
|
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->inode_check = FALSE;
|
||||||
bf->filename = g_strdup (filename);
|
bf->filename = g_strdup (filename);
|
||||||
@ -371,7 +371,7 @@ bin_file_new (const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
bin_file_free (BinFile *bin_file)
|
bin_file_free (bin_file_t *bin_file)
|
||||||
{
|
{
|
||||||
if (--bin_file->ref_count == 0)
|
if (--bin_file->ref_count == 0)
|
||||||
{
|
{
|
||||||
@ -384,8 +384,8 @@ bin_file_free (BinFile *bin_file)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const BinSymbol *
|
const bin_symbol_t *
|
||||||
bin_file_lookup_symbol (BinFile *bin_file,
|
bin_file_lookup_symbol (bin_file_t *bin_file,
|
||||||
gulong address)
|
gulong address)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
@ -413,7 +413,7 @@ bin_file_lookup_symbol (BinFile *bin_file,
|
|||||||
g_print ("found %lx => %s\n", address,
|
g_print ("found %lx => %s\n", address,
|
||||||
bin_symbol_get_name (bin_file, sym));
|
bin_symbol_get_name (bin_file, sym));
|
||||||
#endif
|
#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);
|
bin_file->text_offset);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (const BinSymbol *)bin_file->undefined_name;
|
return (const bin_symbol_t *)bin_file->undefined_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
bin_file_check_inode (BinFile *bin_file,
|
bin_file_check_inode (bin_file_t *bin_file,
|
||||||
ino_t inode)
|
ino_t inode)
|
||||||
{
|
{
|
||||||
if (bin_file->inode == inode)
|
if (bin_file->inode == inode)
|
||||||
@ -450,8 +450,8 @@ bin_file_check_inode (BinFile *bin_file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const ElfSym *
|
static const ElfSym *
|
||||||
get_elf_sym (BinFile *file,
|
get_elf_sym (bin_file_t *file,
|
||||||
const BinSymbol *symbol,
|
const bin_symbol_t *symbol,
|
||||||
ElfParser **elf_ret)
|
ElfParser **elf_ret)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
@ -475,8 +475,8 @@ get_elf_sym (BinFile *file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
bin_symbol_get_name (BinFile *file,
|
bin_symbol_get_name (bin_file_t *file,
|
||||||
const BinSymbol *symbol)
|
const bin_symbol_t *symbol)
|
||||||
{
|
{
|
||||||
if (file->undefined_name == (char *)symbol)
|
if (file->undefined_name == (char *)symbol)
|
||||||
{
|
{
|
||||||
@ -494,8 +494,8 @@ bin_symbol_get_name (BinFile *file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gulong
|
gulong
|
||||||
bin_symbol_get_address (BinFile *file,
|
bin_symbol_get_address (bin_file_t *file,
|
||||||
const BinSymbol *symbol)
|
const bin_symbol_t *symbol)
|
||||||
{
|
{
|
||||||
if (file->undefined_name == (char *)symbol)
|
if (file->undefined_name == (char *)symbol)
|
||||||
{
|
{
|
||||||
|
|||||||
20
binfile.h
20
binfile.h
@ -27,20 +27,20 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
typedef struct BinFile BinFile;
|
typedef struct bin_file_t bin_file_t;
|
||||||
typedef struct BinSymbol BinSymbol;
|
typedef struct bin_symbol_t bin_symbol_t;
|
||||||
|
|
||||||
/* Binary File */
|
/* Binary File */
|
||||||
|
|
||||||
BinFile * bin_file_new (const char *filename);
|
bin_file_t * bin_file_new (const char *filename);
|
||||||
void bin_file_free (BinFile *bin_file);
|
void bin_file_free (bin_file_t *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);
|
gulong address);
|
||||||
gboolean bin_file_check_inode (BinFile *bin_file,
|
gboolean bin_file_check_inode (bin_file_t *bin_file,
|
||||||
ino_t inode);
|
ino_t inode);
|
||||||
const char * bin_symbol_get_name (BinFile *bin_file,
|
const char * bin_symbol_get_name (bin_file_t *bin_file,
|
||||||
const BinSymbol *symbol);
|
const bin_symbol_t *symbol);
|
||||||
gulong bin_symbol_get_address (BinFile *bin_file,
|
gulong bin_symbol_get_address (bin_file_t *bin_file,
|
||||||
const BinSymbol *symbol);
|
const bin_symbol_t *symbol);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -972,7 +972,7 @@ expand_descendants_tree (Application *app)
|
|||||||
GTK_TREE_VIEW (app->descendants_view), best_path, FALSE);
|
GTK_TREE_VIEW (app->descendants_view), best_path, FALSE);
|
||||||
n_rows += n_children;
|
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);
|
GtkTreePath *path = gtk_tree_path_copy (best_path);
|
||||||
gtk_tree_path_down (path);
|
gtk_tree_path_down (path);
|
||||||
|
|||||||
@ -795,10 +795,10 @@ make_message (state_t *state, const char *format, ...)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BinFile *
|
static bin_file_t *
|
||||||
state_get_bin_file (state_t *state, const char *filename)
|
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)
|
if (!bf)
|
||||||
{
|
{
|
||||||
@ -834,8 +834,8 @@ lookup_symbol (state_t *state,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BinFile *bin_file = state_get_bin_file (state, map->filename);
|
bin_file_t *bin_file = state_get_bin_file (state, map->filename);
|
||||||
const BinSymbol *bin_sym;
|
const bin_symbol_t *bin_sym;
|
||||||
|
|
||||||
address -= map->start;
|
address -= map->start;
|
||||||
address += map->offset;
|
address += map->offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user