Generalize and parallelize trace_invariants test into a first-class tool
The drcachesim trace_invariants test performs sanity checks for various properties of traces, ensuring we have no problems in collection or post-processing that leave PC gaps or violate the promises we make to core simulators. What we'd like to do is be able to run it on large traces by generalizing and speeding it up:
- Add parallel operation support. It can still check the thread transition invariants by looking for timestamps and assuming another thread could interleave there.
- Generalize error reporting to be customizable instead of using
assert
. - Report further details on where the error was found: maybe the instruction count for use with the
view
tool and-skip_refs
. - Add single-thread support to the
view
tool to speed up locating the error? So we'd report the instruction count for that thread which is all we'd have for parallel operation anyway. - Generalize or put under options the current checks that rely on annotations inside the
signal_invariants
andfilter_asm
test binaries. - Add checks for nested signals (to catch #4998 (closed)) under an option since some apps do expect them.