- contributed by Antoine Leca
if (is_idle)
restart_local_timer();
-
+#if SPROFILE
if (sprofiling)
get_cpulocal_var(idle_interrupted) = 1;
+#endif
}
PUBLIC u64_t ms_2_cpu_time(unsigned ms)
/* start accounting for the idle time */
context_stop(proc_addr(KERNEL));
+#if !SPROFILE
+ halt_cpu();
+#else
if (!sprofiling)
halt_cpu();
else {
interrupts_disable();
*v = 0;
}
+#endif
/*
* end of accounting for the idle task does not happen here, the kernel
* is handling stuff for quite a while before it gets back here!
PUBLIC void nmi_watchdog_handler(struct nmi_frame * frame)
{
+#if SPROFILE
/*
* Do not check for lockups while profiling, it is extremely likely that
* a false positive is detected if the frequency is high
if ((watchdog_enabled || sprofiling) && watchdog->reinit)
watchdog->reinit(cpuid);
+#else
+ if (watchdog_enabled) {
+ lockup_check(frame);
+ if (watchdog->reinit)
+ watchdog->reinit(cpuid);
+ }
+#endif
}
int nmi_watchdog_start_profiling(const unsigned freq)