BinaryAnalysisPlatform / qemu

Official QEMU mirror
Other
9 stars 12 forks source link

Add option to only save unique frames #40

Open Rot127 opened 9 months ago

Rot127 commented 9 months ago

Depending on the binary, traces can become very big (>10GB).

Especially for binaries which have many loops with not too much different input and output data (e.g. hash algorithms) we could reduce the trace size by only adding unique frames.

This could reduce testing time for them and save space.

Simply hashing the frames content for comparison should be enough?

ivg commented 9 months ago

We might need something more fine-grained, as just dropping frames with the same contents might affect lots of innocent frames, e.g., rax := 0 is a pretty common frame, and we don't want to drop them everywhere. We might try some run-length encoding (RLE), i.e., if we see a repeating frame we can suppress it, until a new frame and then issue a repeat frame that says that the previous frame was repeated. To extend this to several frames we might buffer N frames in a queue and pack them in a subtrace (much like dynamorio does) and then issue repetition frames on subframes.