summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@src.gnome.org>2004-11-21 23:33:56 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2004-11-21 23:33:56 +0000
commit7f02ecd503edacbfc4a5c8ac19b21909032020cf (patch)
tree7ff1a570bd780a0302fd3ac53c792c07364ac4e2
parenta0100c8865d7dff52e331a59017152a863e42c02 (diff)
*** empty log message ***
-rw-r--r--TODO4
-rw-r--r--process.c8
-rw-r--r--sysprof-module.c2
3 files changed, 11 insertions, 3 deletions
diff --git a/TODO b/TODO
index 1f08f80..50971fc 100644
--- a/TODO
+++ b/TODO
@@ -13,6 +13,10 @@
- Port to GtkAction
+- If we can't get a name, look in /proc/<pid>/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 760f527..d5fd9c5 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 96cf43c..7ae2ca9 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))