Commit 8f254f0
committed
ref: exclude benchmark harness from measurement via collection steady-state
Toggle callgrind collection off once at process start and make the
PauseTiming()/ResumeTiming() toggles unconditional. Collection is now
only enabled inside the benchmark loop, so State setup, timer reads and
instrument-hooks zero/dump requests no longer appear in the measurement,
and the codspeed_in_benchmark_loop_ gating flag is no longer needed.
The toggle is inlined via CALLGRIND_TOGGLE_COLLECT directly (instead of
calling the instrument-hooks wrapper) so no toggle frame shows up in
flamegraphs; the counted boundary shrinks to the ResumeTiming() epilogue
(~6 instructions). SkipWithMessage/SkipWithError restore the toggle
parity when a benchmark is skipped mid-loop without pausing.
Refs COD-20331 parent 198b668 commit 8f254f0
3 files changed
Lines changed: 27 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
91 | 112 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
949 | 949 | | |
950 | 950 | | |
951 | 951 | | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | 952 | | |
962 | 953 | | |
963 | 954 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | | - | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | 202 | | |
206 | 203 | | |
207 | 204 | | |
| |||
275 | 272 | | |
276 | 273 | | |
277 | 274 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
| 275 | + | |
287 | 276 | | |
288 | 277 | | |
289 | 278 | | |
| |||
322 | 311 | | |
323 | 312 | | |
324 | 313 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 314 | + | |
331 | 315 | | |
332 | 316 | | |
333 | 317 | | |
| |||
342 | 326 | | |
343 | 327 | | |
344 | 328 | | |
| 329 | + | |
345 | 330 | | |
346 | 331 | | |
347 | 332 | | |
| |||
357 | 342 | | |
358 | 343 | | |
359 | 344 | | |
| 345 | + | |
360 | 346 | | |
361 | 347 | | |
362 | 348 | | |
| |||
379 | 365 | | |
380 | 366 | | |
381 | 367 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | 368 | | |
388 | 369 | | |
389 | 370 | | |
390 | 371 | | |
391 | 372 | | |
392 | 373 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | 374 | | |
399 | 375 | | |
400 | 376 | | |
| |||
0 commit comments