Added tracebd.py, a script for rendering block device operations

Based on a handful of local hacky variations, this sort of trace
rendering is surprisingly useful for getting an understanding of how
different filesystem operations interact with the underlying
block-device.

At some point it would probably be good to reimplement this in a
compiled language. Parsing and tracking the trace output quickly
becomes a bottleneck with the amount of trace output the tests
generate.

Note also that since tracebd.py run on trace output, it can also be
used to debug logged block-device operations post-run.
This commit is contained in:
Christopher Haster
2022-09-02 03:08:28 -05:00
parent c9a6e3a95b
commit 91200e6678
7 changed files with 878 additions and 80 deletions

View File

@ -501,7 +501,7 @@ if __name__ == "__main__":
help="Show uncovered branches.")
parser.add_argument('-c', '--context', type=lambda x: int(x, 0), default=3,
help="Show a additional lines of context. Defaults to 3.")
parser.add_argument('-w', '--width', type=lambda x: int(x, 0), default=80,
parser.add_argument('-W', '--width', type=lambda x: int(x, 0), default=80,
help="Assume source is styled with this many columns. Defaults to 80.")
parser.add_argument('--color',
choices=['never', 'always', 'auto'], default='auto',