Author: trasz Date: Sun Apr 23 17:39:31 2017 New Revision: 317341 URL: https://svnweb.freebsd.org/changeset/base/317341
Log: Improve BUF_TRACKING by not displaying NULL entries. Reviewed by: cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10443 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Apr 23 14:25:51 2017 (r317340) +++ head/sys/kern/vfs_bio.c Sun Apr 23 17:39:31 2017 (r317341) @@ -4927,9 +4927,12 @@ DB_SHOW_COMMAND(buffer, db_show_buffer) db_printf("b_io_tracking: b_io_tcnt = %u\n", bp->b_io_tcnt); i = bp->b_io_tcnt % BUF_TRACKING_SIZE; - for (j = 1; j <= BUF_TRACKING_SIZE; j++) + for (j = 1; j <= BUF_TRACKING_SIZE; j++) { + if (bp->b_io_tracking[BUF_TRACKING_ENTRY(i - j)] == NULL) + continue; db_printf(" %2u: %s\n", j, bp->b_io_tracking[BUF_TRACKING_ENTRY(i - j)]); + } #elif defined(BUF_TRACKING) db_printf("b_io_tracking: %s\n", bp->b_io_tracking); #endif _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"