lks9 / src-tracer

Other
0 stars 0 forks source link

Zstd #55

Closed lks9 closed 1 month ago

lks9 commented 8 months ago

solves #53

By using a page fault trap (with uffdio), we can remove the check if (trace_pos != TRACE_BUF_SIZE) { trace_write(); } we currently have on master for every byte! Instead, when writing to a position near TRACE_BUF_SIZE, a page fault is triggered because we placed a write protection flag there. When we "handle" the fault, we call trace_write(). This reduces the overhead of trace writing basically to the speed of the disk!

(I also have a more portable branch without uffdio is fork_shared_mmap_zstd. However, due to missing synchronization, the traced program runs unhemmed without caring whether traces are written or not. This leads to a loss of blocks in the recorded trace.)

We observed that using compression additionally lowers the run-time overhead caused by disk speed. Of course, also lowering trace size.

All in all the run-time overhead should be less then 15 percent now, for many apps even zero. Extensive experiments still pending.

lks9 commented 1 month ago

Closed in favor of #63