Commit 7cb3c86
rust: Call _coz_add_delays() after counter increments
The Rust crate was not calling `_coz_add_delays()` after incrementing
progress counters. The C `COZ_INCREMENT_COUNTER` macro in `coz.h` calls
`_call_coz_add_delays()` after every increment — this is required for the
profiler to inject virtual delays for causal profiling experiments.
Without this call, the profiler detects 0 experiments despite counters
being incremented correctly.
Also changes the atomic ordering from SeqCst to Relaxed to match the C
implementation (`__ATOMIC_RELAXED`), which is sufficient since libcoz
uses its own synchronization.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1d1839a commit 7cb3c86
1 file changed
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
206 | 212 | | |
207 | 213 | | |
208 | 214 | | |
| |||
226 | 232 | | |
227 | 233 | | |
228 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
229 | 259 | | |
230 | 260 | | |
231 | 261 | | |
232 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
0 commit comments