summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clocksource.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_clocksource.c')
-rw-r--r--sys/kern/kern_clocksource.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c
index d94157c..2217610 100644
--- a/sys/kern/kern_clocksource.c
+++ b/sys/kern/kern_clocksource.c
@@ -195,28 +195,34 @@ handleevents(struct bintime *now, int fake)
pc = TRAPF_PC(frame);
}
- runs = 0;
state = DPCPU_PTR(timerstate);
+ runs = 0;
while (bintime_cmp(now, &state->nexthard, >=)) {
bintime_add(&state->nexthard, &hardperiod);
runs++;
}
if (runs && fake < 2) {
- hardclock_anycpu(runs, usermode);
+ hardclock_cnt(runs, usermode);
done = 1;
}
+ runs = 0;
while (bintime_cmp(now, &state->nextstat, >=)) {
- if (fake < 2)
- statclock(usermode);
bintime_add(&state->nextstat, &statperiod);
+ runs++;
+ }
+ if (runs && fake < 2) {
+ statclock_cnt(runs, usermode);
done = 1;
}
if (profiling) {
+ runs = 0;
while (bintime_cmp(now, &state->nextprof, >=)) {
- if (!fake)
- profclock(usermode, pc);
bintime_add(&state->nextprof, &profperiod);
+ runs++;
+ }
+ if (runs && !fake) {
+ profclock_cnt(runs, usermode, pc);
done = 1;
}
} else
OpenPOWER on IntegriCloud