使用完全竞争检测的高效确定性重放
Efficient Deterministic Replay Using Complete Race Detection
摘要:
数据竞争会严重影响多线程程序的执行。因此,必须重现数据竞争的结果,以确定性地重放多线程程序。然而,数据竞争隐藏在程序中大量的内存操作中。由于难以准确识别数据竞争,以往的多线程确定性记录/重放方案都放弃了直接记录数据竞争。因此,它们要么记录所有共享内存操作,这会显著降低生产运行速度,要么只记录同步操作,这会导致大量的重播工作。受数据竞争检测的启发,我们提出了一个高效的软件确定性重放方案的商品多处理器系统,这是命名为RacX。RacX的关键见解如下:虽然准确识别一对内存操作之间的数据竞争存在NP-困难,但我们可以找出多线程程序中所有潜在的数据竞争,其中误报可以通过我们的自动误报减少技术减少到很小的数量。因此,RacX可以有效地监控所有潜在的数据竞争,以确定性地重放多线程程序。为了评估RacX,我们已经进行了一些著名的多线程程序从SPLASH-2基准套件和大型商业程序的实验。RacX可以精确地重现这些程序的生产运行,具有价值决定论。平均而言,RacX在记录过程中仅导致原始运行速度降低约1.21%、1.89%、2.20%和8.41%(分别针对2、4、8和16线程程序)。RacX的可靠性、高效性、可扩展性和可移植性很好地证明了它的优越性。
英文摘要:
Data races can significantly affect the executions of multi-threaded programs. Hence, one has to recur the results of data races to deterministically replay a multi-threaded program. However, data races are concealed in enormous number of memory operations in a program. Due to the difficulty of accurately identifying data races, previous multi-threaded deterministic record/replay schemes for commodity multi-processor system give up to record data races directly. Consequently, they either record all shared memory operations, which brings remarkable slowdown to the production run, or record the synchronization only, which introduces significant efforts to replay. Inspired by the advances in data race detection, we propose an efficient software-only deterministic replay scheme for commodity multi-processor systems, which is named RacX. The key insight of RacX is as follows: although it is NP-hard to accurately identify the existence of data races between a pair of memory operations, we can find out all potential data races in a multi-threaded program, in which the false positives can be reduced to a small amount with our automatic false positive reduction techniques. As a result, RacX can efficiently monitor all potential data races to deterministically replay a multi-threaded program. To evaluate RacX, we have carried out experiments over a number of well-known multi-threaded programs from SPLASH-2 benchmark suite and large-scale commercial programs. RacX can precisely recur production runs of these programs with value determinism. Averagely, RacX causes only about 1.21%, 1.89%, 2.20%, and 8.41% slowdown to the original run during recording (for 2-, 4-, 8- and 16-thread programs, respectively). The soundness, efficiency, scalability, and portability of RacX well demonstrate its superiority.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。