Index: kern_synch.c =================================================================== RCS file: /cvsroot/src/sys/kern/kern_synch.c,v retrieving revision 1.308 diff -p -r1.308 kern_synch.c *** kern_synch.c 28 Feb 2014 10:16:51 -0000 1.308 --- kern_synch.c 5 Nov 2014 08:03:37 -0000 *************** updatertime(lwp_t *l, const struct binti *** 453,458 **** --- 453,467 ---- if (__predict_false(l->l_flag & LW_IDLE)) return; + #if defined(__sparc__) + { + struct bintime delta = *now; + bintime_sub(&delta, &l->l_stime); + if (delta.sec < 0 /*|| (delta.sec == 0 && delta.frac < 0)*/) { + log(LOG_DEBUG, "cpu%u: (%u.%u:%s) delta.sec = %lld, delta.frac = %llu\n", cpu_number(), l->l_proc->p_pid, l->l_lid, l->l_name ? l->l_name : l->l_proc->p_comm, (long long)delta.sec, (unsigned long long)delta.frac); + } + } + #endif /* rtime += now - stime */ bintime_add(&l->l_rtime, now); bintime_sub(&l->l_rtime, &l->l_stime); Index: kern_tc.c =================================================================== RCS file: /cvsroot/src/sys/kern/kern_tc.c,v retrieving revision 1.46 diff -p -r1.46 kern_tc.c *** kern_tc.c 14 Sep 2013 20:52:43 -0000 1.46 --- kern_tc.c 5 Nov 2014 08:03:37 -0000 *************** tc_windup(void) *** 739,744 **** --- 739,750 ---- ncount = 0; th->th_offset_count += delta; bintime_addx(&th->th_offset, th->th_scale * delta); + #ifdef __sparc__ + if (delta & 0x80000000) + log(LOG_DEBUG, "cpu%u: (%u.%u:%s) tc_delta() gave: %x (th_offset_count now %llx)\n", + cpu_number(), curlwp->l_proc->p_pid, curlwp->l_lid, curlwp->l_name ? curlwp->l_name : curlwp->l_proc->p_comm, + delta, (unsigned long long)th->th_offset_count); + #endif /* * Hardware latching timecounters may not generate interrupts on