I was pondering on a per-path counter...
From
Chris M. Thomasson@3:633/10 to
All on Thu Oct 23 14:02:13 2025
Per path can be for a given program source code, and the paths can take
after static analysis... It creates a re-instrumented form, and runs it
with a thread that monitors its per thread paths. When all paths are
hit, it can halt... ;^)
For the per path counters starting at 0, we want to say okay they were
hit, and we need a count, but still always show that they were hit.
Think of a counter rolling over back to 0. Uggg. Therefore, this atomic
algo might work for a per-path counter:
p = fetch_add_relaxed(counter, 0x2);
if (p == 0) fetch_or_relaxed(counter, 0x1);
These per path counters would be for each path in a re-instrumented
program. Just want it to say hit, and allow for a counter that might roll...
--- PyGate Linux v1.5
* Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)