/*===========================================================================* * timing_dmp * *===========================================================================*/ void timing_dmp() { static struct util_timingdata timingdata[TIMING_CATEGORIES]; int r, c, x = 0; if ((r = sys_getlocktimings(&timingdata[0])) != 0) { report("IS","warning: couldn't get copy of lock timings", r); return; } for(c = 0; c < TIMING_CATEGORIES; c++) { int b; if (!timingdata[c].lock_timings_range[0] || !timingdata[c].binsize) continue; x = printk("%-*s: misses %lu, resets %lu, measurements %lu: ", TIMING_NAME, timingdata[c].names, timingdata[c].misses, timingdata[c].resets, timingdata[c].measurements); for(b = 0; b < TIMING_POINTS; b++) { int w; if (!timingdata[c].lock_timings[b]) continue; x += (w = printk(" %5d: %5d", timingdata[c].lock_timings_range[0] + b*timingdata[c].binsize, timingdata[c].lock_timings[b])); if (x + w >= 80) { printk("\n"); x = 0; } } if (x > 0) printk("\n"); } }
/*===========================================================================* * timing_dmp * *===========================================================================*/ PUBLIC void timing_dmp() { #if ! DEBUG_TIME_LOCKS printf("Enable the DEBUG_TIME_LOCKS definition in src/kernel/config.h\n"); #else static struct lock_timingdata timingdata[TIMING_CATEGORIES]; int r, c, f, skipped = 0, printed = 0, maxlines = 23, x = 0; static int offsetlines = 0; if ((r = sys_getlocktimings(&timingdata[0])) != OK) { report("IS","warning: couldn't get copy of lock timings", r); return; } for(c = 0; c < TIMING_CATEGORIES; c++) { int b; if (!timingdata[c].lock_timings_range[0] || !timingdata[c].binsize) continue; x = printf("%-*s: misses %lu, resets %lu, measurements %lu: ", TIMING_NAME, timingdata[c].names, timingdata[c].misses, timingdata[c].resets, timingdata[c].measurements); for(b = 0; b < TIMING_POINTS; b++) { int w; if (!timingdata[c].lock_timings[b]) continue; x += (w = printf(" %5d: %5d", timingdata[c].lock_timings_range[0] + b*timingdata[c].binsize, timingdata[c].lock_timings[b])); if (x + w >= 80) { printf("\n"); x = 0; } } if (x > 0) printf("\n"); } #endif }