Subject: Re: callgraph ARM7
To: Ben Harris <>
From: Richard Earnshaw <>
List: port-arm
Date: 09/25/2001 14:27:49
> As I said above, this is because SetCPSR is used to unblock interrupts, so
> you get a lot of things like this (assuming acorn32, which doesn't have
> real statclock interrupts):
> s = splhigh(); /* or anything that blocks hardclock */
> do_stuff();
> do_more_stuff();	<--- Hardclock fires here, but it's blocked...
> still_doing_stuff();
> splx(s); /* which calls... */
>  \- SetCPSR();		<--- Interrupts re-enabled, so we handle that hardclock
>    \- hardclock();
>      \- statclock();	<--- Looks at the irqframe, discovers the IRQ
> 			     happened in SetCPSR, and charges another
>                              clock tick to it.
> Thus, SetCPSR() will appear to be responsible for all the CPU time that's
> spent with hardclock interrupts disabled.  Does that make sense?

Doh!  Yes.  Thanks for the explanation.

So we can infer from this that a large SetCPSR count => too much time with 
interrupts blocked.