From 5dec3764c1fabaa7dfbe89b285ecbcad0a332106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sandmann?= Date: Fri, 21 Jan 2005 16:27:41 +0000 Subject: [PATCH] Some updates - add note about SMP kernels. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fri Jan 21 11:23:54 2005 Søren Sandmann * README: Some updates - add note about SMP kernels. * sysprof-module.c: Go back to just sampling the current process. * ChangeLog: I guess these do make sense, so start one. --- ChangeLog | 8 ++++++++ README | 5 +++-- sysprof-module.c | 10 +++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 ChangeLog diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..44923392 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,8 @@ +Fri Jan 21 11:23:54 2005 Søren Sandmann + + * README: Some updates - add note about SMP kernels. + + * sysprof-module.c: Go back to just sampling the current + process. + + * ChangeLog: I guess these do make sense, so start one. diff --git a/README b/README index d2212cf3..a061b75f 100644 --- a/README +++ b/README @@ -4,10 +4,11 @@ program "sysprof". - There is no auto* stuff. Just type "make" and hope for the best -- You need gtk+ 2.4.0 or better. If you are using gtk+ 2.5 or greater, +- You need gtk+ 2.4.0 or better. If you are using gtk+ 2.5 or newer you also need libglade cvs HEAD. -- You need a 2.6 kernel +- You need a 2.6 kernel. On SMP kernels the module seems to crash the system + from time to time, so you might want to stick with UP kernels. - The programs you want to profile should have debugging symbols, or you won't get much usable information. On a Fedora Core system, diff --git a/sysprof-module.c b/sysprof-module.c index 4b5711a9..67301f3e 100644 --- a/sysprof-module.c +++ b/sysprof-module.c @@ -302,14 +302,22 @@ queue_generate_stack_trace (struct task_struct *cur) static void on_timer(unsigned long dong) { +#if 0 struct task_struct *p; +#endif static const int cpu_profiler = 1; /* set to 0 to profile disk */ + + if (current && current->pid != 0) { +#if 0 for_each_process (p) { if (p->state == (cpu_profiler? TASK_RUNNING : TASK_UNINTERRUPTIBLE)) { - queue_generate_stack_trace (p); +#endif + queue_generate_stack_trace (current); +#if 0 } +#endif } add_timeout (INTERVAL, on_timer);