[prev in list] [next in list] [prev in thread] [next in thread] 

List:       oprofile-list
Subject:    Re: Call stack profiling
From:       David Smith <dsmith () algonet ! se>
Date:       2002-09-15 22:57:03
[Download RAW message or body]

Philippe Elie wrote:
> 
> David Smith wrote:
>
> > #define was_in_interrupt() ({ int __cpu = smp_processor_id(); \
> >       (local_irq_count(__cpu) + local_bh_count(__cpu) > 1); })
> 
> If needed you can look as in oprofile.c (regs->eflags & IF_MASK)

That only says if interrupts were enabled, not if the interrupted
code was in an interrupt.

> but can you clarify why we need this.If we are in interrupt a
> part of the kernel backtrace will be wrong but why we can't get
> get user eip ?
> 

We could, but interrupts are just sort of random events. With syscalls
and (arguably) faults it is the running process that is causing it,
but interrupts are just happening. It would be wrong to account the
running process for them.

/David


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic