DynamoRIO / dynamorio

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

Repeated idle entries balloon drmemtrace record-replay file sizes #6675

Closed derekbruening closed 4 months ago

derekbruening commented 4 months ago

We're seeing very large record-replay files with i/o modeling from #6471. E.g., for one small app, the as-traced schedule files are <4K, while the record-replay is 34MB.

Looking closely we see many repeated idle entries:

$ unzip -p /tmp/foo-record.zip output.0000 | od -t x8 -A x -w32 | head -40
000000 0000000000000001 0000000000000000 0000000000000000 00061201fa129d62
000020 0000000000000000 0000000000000000 ffffffffffffffff 00061201fa12bad4
000040 0000000800000000 0000000000000000 ffffffffffffffff 00061201fa12c2e1
000060 0000001600000000 0000000000000000 0000000000000275 00061201fa12cf61
000080 0000001700000000 0000000000000000 ffffffffffffffff 00061201fa12d11f
0000a0 0000000a00000000 0000000000000000 000000000000187e 00061201fa12d1b9
0000c0 0000001200000000 0000000000000000 ffffffffffffffff 00061201fa12ed32
0000e0 0000001800000000 0000000000000000 ffffffffffffffff 00061201fa134692
000100 0000000200000000 0000000000000000 ffffffffffffffff 00061201fa1401e5
000120 0000000000000005 0000000000000003 0000000000000000 00061201fa14b740
000140 0000000000000005 0000000000000002 0000000000000000 00061201fa14b745
000160 0000000000000005 000000000000000c 0000000000000000 00061201fa14b748
000180 0000000000000005 0000000000000002 0000000000000000 00061201fa14b757
0001a0 0000000000000005 0000000000000008 0000000000000000 00061201fa14b75b
0001c0 0000000000000005 0000000000000008 0000000000000000 00061201fa14b765
0001e0 0000000000000005 000000000000000e 0000000000000000 00061201fa14b76f
000200 0000000000000005 0000000000000003 0000000000000000 00061201fa14b77f
000220 0000000000000005 0000000000000000 0000000000000000 00061201fa14b784
000240 0000000000000005 0000000000000002 0000000000000000 00061201fa14b785
000260 0000000000000005 0000000000000001 0000000000000000 00061201fa14b788
000280 0000000000000005 0000000000000002 0000000000000000 00061201fa14b78a
0002a0 0000000000000005 0000000000000008 0000000000000000 00061201fa14b78e
0002c0 0000000000000005 0000000000000002 0000000000000000 00061201fa14b798
0002e0 0000000000000005 0000000000000000 0000000000000000 00061201fa14b79b
000300 0000000000000005 0000000000000002 0000000000000000 00061201fa14b79d
000320 0000000000000005 0000000000000000 0000000000000000 00061201fa14b7a1

The idles certainly look like they can be collapsed.

But are mid-identical-sequence timestamps used for any ordering? Not for idle entries: should be ok to collapse.