diff options
author | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2006-09-23 00:57:20 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2006-09-23 00:57:20 +0000 |
commit | 8f4d731788477c12ad555a57064eda0975e8386e (patch) | |
tree | 994ad2b3f39ac88f446c07cefe408ed4437108da /module | |
parent | b7cf5d34b8ee7ca23836f0efc527fd0ee0ce7e61 (diff) |
Revert accidental commit
Diffstat (limited to 'module')
-rw-r--r-- | module/Makefile | 2 | ||||
-rw-r--r-- | module/sysprof-module.c | 31 |
2 files changed, 1 insertions, 32 deletions
diff --git a/module/Makefile b/module/Makefile index f89c2e3..850c896 100644 --- a/module/Makefile +++ b/module/Makefile @@ -28,7 +28,7 @@ endif # build module -$(MODULE).o: $(MODULE).c $(MODULE).h +$(MODULE).o: $(MODULE).c $(KMAKE) modules diff --git a/module/sysprof-module.c b/module/sysprof-module.c index e5ea800..d4f30b4 100644 --- a/module/sysprof-module.c +++ b/module/sysprof-module.c @@ -126,7 +126,6 @@ timer_notify (struct pt_regs *regs) StackFrame frame; int result; static atomic_t in_timer_notify = ATOMIC_INIT(1); - int stacksize; if (((++get_cpu_var(n_samples)) % INTERVAL) != 0) return 0; @@ -158,41 +157,11 @@ timer_notify (struct pt_regs *regs) trace->addresses[i++] = (void *)regs->REG_INS_PTR; frame_pointer = (void *)regs->REG_FRAME_PTR; - - { - /* In principle we should use get_task_mm() but - * that will use task_lock() leading to deadlock - * if somebody already has the lock - */ - if (spin_is_locked (¤t->alloc_lock)) - printk ("alreadylocked\n"); - { - struct mm_struct *mm = current->mm; - if (mm) - { - printk (KERN_ALERT "stack size: %d (%d)\n", - mm->start_stack - regs->REG_STACK_PTR, - current->pid); - - stacksize = mm->start_stack - regs->REG_STACK_PTR; - } - else - stacksize = 1; - } -#if 0 - else - printk (KERN_ALERT "could not lock on %d\n", current->pid); -#endif - } - if (stacksize < 100000) - goto out; - while (((result = read_frame (frame_pointer, &frame)) == 0) && i < SYSPROF_MAX_ADDRESSES && (unsigned long)frame_pointer >= regs->REG_STACK_PTR) { - printk ("frame pointer: %p (retaddr: %p)\n", frame_pointer, frame.return_address); trace->addresses[i++] = (void *)frame.return_address; frame_pointer = (StackFrame *)frame.next; } |