For userspace probes DTrace uses INT3 AFAIK. Taking a signal each time a probe gets hit can be high overhead for certain usages though (like low overhead profiling as opposed to intrusive debugging).
This works since x86 guarantees atomicity for aligned reads and writes w.rt. instruction fetch. LOCK prefix can be used for unaligned reads/writes to ensure atomicity of data reads and writes. But Intel SDM says (in…
For userspace probes DTrace uses INT3 AFAIK. Taking a signal each time a probe gets hit can be high overhead for certain usages though (like low overhead profiling as opposed to intrusive debugging).
This works since x86 guarantees atomicity for aligned reads and writes w.rt. instruction fetch. LOCK prefix can be used for unaligned reads/writes to ensure atomicity of data reads and writes. But Intel SDM says (in…