winnukem/racehound — pull request #5 by euspectre (2013-09-22 18:26:51+00:00)
Title: Redesigned handling of software BPs; tuned the delays

1.
I have redesigned the mechanism to handle the software breakpoints. Now the breakpoint instructions remain all the time (unless reset by addr_work_fn). After the breakpoint is handled, a copy of the instruction is executed in a special buffer ("detour buffer") rather than in place.

No need to reset them all the time. We also avoid the situation when a breakpoint is reset before the instruction has a chance to execute and this way triggers again and again.

2.
The "detour buffer" technique also allowed to make the delays smaller (on my systems, 5 jiffies proved more than enough for both the self-tests and e1000) to reduce the system overhead and still catch more races than before. Set the default delay accordingly.

3.
Made the time interval for update of the set of chosen breakpoints configurable (see bp_update_interval parameter). Besides, if it is 0, the breakpoints will not change since they have been set.

The details are in the commit descriptions, as usual.