Repository navigation
Conversation
Merging this PR will degrade performance by 58.02%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | sleep 1 |
245.7 µs | 585.4 µs | -58.02% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing cod-3722-ignore-process-spawning-overhead-in-exec-harness-simulation (a301550) with main (8368147)2
Footnotes
-
6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
spike/cod-3440-memtrack-musl(ecbfb5b) during the generation of this report, somain(8368147) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
c72e991 to
3c1b378
Compare
1af664e to
8fb4858
Compare
345f77b to
b0533e3
Compare
Add set_executed_benchmark_for_pid, which passes an explicit pid to instrument_hooks_set_executed_benchmark instead of the calling process' own. set_executed_benchmark keeps its behavior and delegates to it. Bump instrument-hooks, whose valgrind instrument now writes a "Benchmark pid: <pid>" desc line in the dump part when that pid is not the calling process'. This also brings thread-safe C API exports and the callgrind_toggle_collect helper. Refs COD-3722 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b0533e3 to
a301550
Compare
Make exec-harness declare the pid of the command it benchmarks, so its own spawning cost can be left out of simulation results.
Since #531, exec-harness turns instrumentation on in its own process and spawns the command, which inherits that state across fork and exec. The dumped part therefore also holds the harness's cost of spawning the command and waiting for it. That is a fixed overhead on every benchmark, about 207k instructions per command locally.
Changes:
set_executed_benchmark_for_pid(pid, uri).set_executed_benchmarkkeeps its behavior and delegates to it.Command::status(). In memory mode the pid only travels to the runner's FIFO, where nothing reads it for exec-harness.desc: Benchmark pid: <pid>in the part when the pid is not the caller's. This bump also brings the thread-safe C API exports and thecallgrind_toggle_collecthelper.Checked locally under the patched valgrind, with the runner's simulation flags on
sh -c '/bin/true; /bin/true; :':Still to do before this is ready:
0codspeed8once feat(callgrind): add CALLGRIND_ADD_DESC client request valgrind-codspeed#43 is released. Until then the request is ignored with a warning and results keep the harness's cost.Closes COD-3722