summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@src.gnome.org>2004-11-21 23:22:42 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2004-11-21 23:22:42 +0000
commit6583d59e1888267a51462cdb02e8ba7c099ca2f2 (patch)
tree34598ea7c061c30e5cb9d36766708b11673cfa03
parent0ecfd151167019c6e3d7d56d6bfba1d0962b25b8 (diff)
*** empty log message ***
-rw-r--r--sysprof-module.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sysprof-module.c b/sysprof-module.c
index 1f42de3..3ce6592 100644
--- a/sysprof-module.c
+++ b/sysprof-module.c
@@ -303,12 +303,11 @@ static void
on_timer(unsigned long dong)
{
struct task_struct *p;
+
+ static const int cpu_profiler = 1; /* set to 0 to profile disk */
for_each_process (p) {
- /* Change TASK_RUNNING to TASK_UNINTERRUPTIABLE to
- * profile (synchronous) disk access
- */
- if (p->state == TASK_RUNNING)
+ if (p->state == cpu_profiler? TASK_RUNNING : TASK_UNINTERRUPTIBLE)
queue_generate_stack_trace (p);
}