if (delta > p_new->max[i])
p_new->max[i] = delta;
if (delta > DELTA) {
- printf("%-5s %2d: %-5d %-5d %-5d %-20s %ldsec\n",
+ fprintf(stdout, "%-5s %2d: %-5d %-5d %-5d %-20s %ldsec\n",
p_old->name, i, delta / MAX_SLEEP,
p_new->avg[i] / MAX_SLEEP, p_new->max[i] / MAX_SLEEP,
p_old->drivers, tick);
}
}
+ fflush(stdout);
skip:
p_old = q_old;
p_new = q_new;
return;
cnt = MAX_CNT;
- printf("-----------------------------------------------------------\n");
- printf("irq cpu: delta avg/s max/s driver time\n");
+ fprintf(stdout,"-----------------------------------------------------------\n");
+ fprintf(stdout,"irq cpu: delta avg/s max/s driver time\n");
before = get_snapshot(cpu_count);
tick = 0;
while (cnt--) {