RISC-V: optionally print timestamps with debug messages
What
Add an option to the sandbox, to print 'nanosecond' timestamps to the debug log.
Why
Allows for additional tooling to pick up these timestamps, to e.g. produce accurate TPS measurements.
How
Passthrough a Console
, which is used by the implementation of console_put_char
, which will either do a passthrough to stdout, or - optionally - insert timings as necessary.
Manually testing the MR
$ cd src/risc_v
$ ./risc-v-sandbox rvemu \
--input ../../tezt/tests/riscv-tests/hermit-loader \
--initrd jstz/target/riscv64gc-unknown-hermit/release/jstz \
--timings # try with/without this option
Edited by Emma Turner