Performance counter and NMI handling

Jugwan Eom zugwan at postech.ac.kr
Wed Nov 15 16:44:23 CET 2006


Udo A. Steinberg 쓴 글:
> On Wed, 15 Nov 2006 20:34:56 +0900 Jugwan Eom (JE) wrote:
>
> JE> > I think it's operation is the same with my code and it reproduced the
> JE> > same result.
>
> JE> + if (ts->_trapno == 2) { // NMI
> JE> +#if 0
> JE> + printf ("%d: CS=%lx %x.%02x IP="L4_PTR_FMT" Trap=%02lx \n",
> JE> + __LINE__, ts->cs(), d_taskno(), d_threadno(), ts->ip (), ts->_trapno);
> JE> +#endif
> JE> + Watchdog::enable();
> JE> + goto success;
> JE> + }
>
> Why do you have a call to Watchdog::enable() in there?
>   
Each time a NMI is raised, a sample that includes the instruction 
pointer, cpu mode (kernel/user), event type (in this case, 
GLOBAL_POWER_EVENTS) and etc. is collected before Watchdog::enable(). 
And Watchdog::enable () resets the counter values 
(Perf_cnt::touch_watchdog()) and clear the overflow flag 
(Perf_cnt::start_watchdog()) and eventually restarts a performance 
counter for the next sample.

Regards,
--
Jugwan Eom









More information about the l4-hackers mailing list