DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.59k stars 552 forks source link

i#6648,i#6593: Add drmemtrace trimming tool with re-chunking support #6651

Closed derekbruening closed 5 months ago

derekbruening commented 5 months ago

Adds re-chunking support to the record filter for archive outputs. The record filter keeps its own instruction and record counts and ignores the original chunk boundaries, putting out its own footer, record ordinal marker, and duplicate timestamps. It remembers encodings and ensures they are repeated at the start of a new chunk.

Adds a new trim_filtert with -trim{before,after}_timestamp options in the filter launcher to remove records not between the given timestamps.

Adds a check for an error string so a filter can trigger an error mid-run.

Adds removal of zero-instruction-count shards after filtering. Removes 3 zero-instruction-count shards from the clients/drcachesim/tests/drmemtrace.legacy-for-record-filter.x64.tracedir/ checked-in trace so the null-filter test can remain a simple check on the output matching the input.

Adds unit tests for the trim filter triggering re-chunking.

Adds a new record filter launcher test running the trim filter on the allasm x86_64 trace with specific timestamps.

As part of adding the new test, updates runmulti.cmake to include the precmd output in what's matched.

Fixes #6593 Fixes #6648

derekbruening commented 5 months ago

I think it is worth the next round now: PTAL.

derekbruening commented 5 months ago

The new aarch64 sve runner once again failed on the type_is_instr assert: #3320, on drcachesim.threads.