Methods to Improve Reverse Debugging Performance
Reverse debugging is software development technique that effectively helps to fix bugs caused by nondeterministic program behavior. Bug elimination usually includes multiple reruns of the program Program executions may be non-deterministic and the debugger may affect program’s behavior. Reverse debugging allows inspecting past program’s states without re-executing it. The paper describes implementation of software reverse debugging using deterministic replay based on the QEMU emulator. Our implementation of deterministic replay records high-level events (user and network input, CPU interrupts, USB and audio input). Record/replay subsystem saves these events into the log at the recording phase and reads them at the replaying phase. Therefore virtual machine is not connected to the real world in the replaying phase. We present ways to improve debugging performance by reducing saved data, using copy-on-write snapshots’ format and indexing/compressing of replay log. QEMU supports a common user interface for reverse debugging in GDB debugger which allows using reverse-continue (going back to the previous breakpoint or watchpoint), reverse-nexti, reverse-stepi (going back to the previous instruction), and reverse-finish (finding the point when function was called) commands. Time required for these commands’ execution depends on taking snapshots frequency in recording replay log. We evaluate shapshotting frequency to get the best reverse debugging performance. In our implementation optimal period for taking snapshots is 3.5 seconds. This paper also presents assessment of snapshots frequency for better performance.
Proceedings of the Institute for System Programming, vol. 27, issue 2, 2015, pp. 127-144.
ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).
DOI: 10.15514/ISPRAS-2015-27(2)-8Full text of the paper in pdf (in Russian) Back to the contents of the volume