diff --git a/TODO b/TODO index 1f08f808..50971fc6 100644 --- a/TODO +++ b/TODO @@ -13,6 +13,10 @@ - Port to GtkAction +- If we can't get a name, look in /proc//status + +- Charge 'self' properly to processes that don't get any stack trace at all + DONE: - consider making ProfileObject more of an object. diff --git a/process.c b/process.c index 760f527a..d5fd9c56 100644 --- a/process.c +++ b/process.c @@ -130,8 +130,12 @@ create_process (const char *cmdline, int pid) Process *p; p = g_new (Process, 1); - - p->cmdline = g_strdup_printf ("[%s]", cmdline); + + if (*cmdline != '\0') + p->cmdline = g_strdup_printf ("[%s]", cmdline); + else + p->cmdline = g_strdup_printf ("[pid %d]", pid); + p->bad_pages = NULL; p->maps = NULL; p->pid = pid; diff --git a/sysprof-module.c b/sysprof-module.c index 96cf43c6..7ae2ca91 100644 --- a/sysprof-module.c +++ b/sysprof-module.c @@ -304,7 +304,7 @@ on_timer(unsigned long dong) { struct task_struct *p; - static const int cpu_profiler = 0; /* set to 0 to profile disk */ + static const int cpu_profiler = 1; /* set to 0 to profile disk */ for_each_process (p) { if (p->state == (cpu_profiler? TASK_RUNNING : TASK_UNINTERRUPTIBLE))