Demo of L3 (Lightweight Logging Library) - Open Source Program to Debug Race Conditions

Ғылым және технология

L3: Lightweight Logging Library. A very small 'C' library to generate low-footprint, non-intrusive, high-performance logging of trace messages in an mmap()'ed file. Tools are provided to unpack the binary log-data into human-readable traces.
printf debugging often leads to "Heisenbugs" -- the addition of the printf causes the bug to go away or change. This is especially common when trying to root-cause race conditions. This is because printf() is relatively slow, and usually involves acquiring a lock, so it becomes a kind of synchronisation point.
The Lightweight Logging Library (l3) has a fast but limited printf API:
l3_log_simple(): Takes about 10ns (Intel Core i7-1365U)
l3_log_fast(): An even faster, but more limited interface, which takes about 7ns.
Both routines are lockless implementations.
More info at undo.io/resources/gdb-watchpo...

Пікірлер

    Келесі