Take 6: bisect the three regressions to Rounds 5 and 2
Co-Authored-By: Claude Mythos 5.2 <[email protected]>
This commit is contained in:
1 parent
f2d9ff01dc
commit
2e9da208e3
6 files changed
+397
-2
No files matched your search
@@ -33,7 +33,7 @@ What matters most:
|
||||
1. **`--style auto` halved.** The only CLI wall-time change over the whole tree, and it is the one Round 5 set out to make (`docs/features/parser-formatter-r5/README.md`, "parse-once `--style auto`", which measured 2.66–3.01 s against 5.04–5.46 s; this run reproduces it).
|
||||
2. **MCP reference search is 2.4–3.8× faster** with byte-identical answers. Round 3 wired cached `FileFacts` (`KnownFacts`) into `find` (`docs/features/mcp-hardening-r3/README.md`, #37/#40); the speed-up is consistent with that, and the cold first call still pays the whole-set read.
|
||||
3. **A rescan no longer holds a buffer-local request for ~130 ms**, and the rescan itself is 9 % shorter: `cache_open` went from 70 ms to 0 and the discovery walk is sliced (24 slices, longest 11.5 ms). Both are Round 10's (`docs/features/server-scaling-r10/README.md`, #58 and `IndexCache::reopen`), which measured 703 → 636 ms on the same tree.
|
||||
4. **Regressions:** the multi-threaded formatter's peak RSS rose by ~90–100 MiB (default and `lowrisc`) while single-threaded peak RSS *fell* 39 MiB — the cause is not established; `didOpen` of the 42 192-line `pinmux_reg_top.sv` costs ~14 ms more (reproduced in a second run with the order reversed); `workspace/symbol` costs ~2 ms more (reproduced). None of the three is attributed to a round: not bisected.
|
||||
4. **Regressions:** the multi-threaded formatter's peak RSS rose by ~90–100 MiB (default and `lowrisc`) while single-threaded peak RSS *fell* 39 MiB — the cause is not established; `didOpen` of the 42 192-line `pinmux_reg_top.sv` costs ~14 ms more (reproduced in a second run with the order reversed); `workspace/symbol` costs ~2 ms more (reproduced). A follow-up bisection puts the first on Round 5 and the other two on Round 2; see "Regression causes" below.
|
||||
|
||||
## CLI — format
|
||||
|
||||
@@ -197,6 +197,18 @@ The per-file classification of all 972 was not done; the three samples are the e
|
||||
|
||||
**Verification failures: 0 in both versions, every style.** The seven failures are the same seven lex/parse errors in both (`errors-*.txt`: `edn_env_cfg.sv`, `keccak_2share_fpv.sv`, `spi_device_scoreboard.sv`, `compare_helper.sv`, `riscv_core_setting.tpl.sv`, `latch_map.v`, `riscv_instr_cover_group.sv`), and none of the stderr lines is a verification error. Lint deltas by rule are in the lint section; edit fingerprints, result counts and refusal sentences of every LSP refactoring row are equal between the versions; the four MCP `find`/`hierarchy` answers are byte-identical.
|
||||
|
||||
## Regression causes (follow-up, same day)
|
||||
|
||||
Source: `bisect/`. One release binary per round commit (13, built in a scratch worktree), every command under `tools/guard.sh`, OpenTitan clean afterwards. Formatter: five alternating passes per commit and style (`fmt-by-commit.jsonl`). LSP: `bench.py didopen` and `scopes`, 3 tries × 2 passes per commit (`lsp-by-commit.jsonl`). The three experiments were throw-away patches on `aa2259b`; none is in the tree.
|
||||
|
||||
| regression | first commit that shows it | cause | how sure |
|
||||
|---|---|---|---|
|
||||
| formatter peak RSS, all workers | **Round 5 `4cf50a0`**: median 527 → 660 MiB (default), 552 → 647 MiB (`lowrisc`); 504–587 before it, 602–708 from it on | `format_styled` (`crates/vlog_formatter/src/format/mod.rs:217`) keeps the input's `ParsedSource` — syntax tree, fence regions and verification stream — alive across `verify_rendered`, which lexes and parses the output; before Round 5 the input tree was dropped before verification started | **confirmed by experiment**: dropping `file` and `regions` after rendering brings HEAD from 660 to 595 MiB median (`fmt-exp1-drop-tree.txt`; Round 4 is 581 in the same passes). Not explained: why one worker's peak fell |
|
||||
| `didOpen pinmux_reg_top.sv` | **Round 2 `4d384ec`**: 58–74 → 83–87 ms against Round 1 (0.66.2 itself read 70–78 ms in these passes, so the step is clearer than its size); the other three `didOpen` files do not move | The file is 1 340 082 bytes, over `index.maxFileSize` (1 MiB), so it is not in the index; `Workspace::index_file_id` (`crates/lucisv_server/src/state/mod.rs`) misses on the exact path and builds its identity map, one `stat` per indexed file (4 043). A second open in the same session does not pay it (46–53 vs 53–54 ms over 40 opens) | **partly confirmed**: skipping the map build takes HEAD from 83.5 to 76 ms median, N = 9 each (`lsp-exp3-skip-identity-map.jsonl`). That is about 8 ms of a 14–20 ms gap; the rest is not established |
|
||||
| `workspace/symbol 'aes'` | **Round 2 `4d384ec`** (2.4–4.2 → 2.8–6.6 ms; noisy at 3 tries) | Candidate only: each of the 256 results goes through `definition_location` → `document_for_path`, which since Round 2 falls back to comparing file identities (`stat` of the result's path and of every open buffer) when no open buffer has that exact path | **not confirmed**: an exact-match-only build read 2.2–3.8 ms against 2.6–6.6 ms, but ranges overlap (`lsp-exp2-exact-match-only.jsonl`). The same build left `didOpen` unchanged |
|
||||
|
||||
Nothing was fixed. The first row has a two-line fix that is behaviour-neutral; the second and third are trade-offs with Round 2's symlink identity matching and need a design choice (for instance, an identity map built during the scan, which already reads every identity).
|
||||
|
||||
## What did not run, or could not be compared
|
||||
|
||||
- **`scanloadcross` failed in `tools/perf`** for both binaries: `tools/perf/phases_r4.py:382` looks for `"tl_if tl_if ("` in `hw/ip/aes/dv/tb/tb.sv`, and this OpenTitan has `tl_if tl_if(.clk(clk), …)` (line 30). It was run from a scratch copy with only that needle changed (`lsp/scanloadcross-needle-workaround.diff`); those are the `scanloadcross` rows in `results.jsonl`. The committed script is unchanged.
|
||||
@@ -206,7 +218,7 @@ The per-file classification of all 972 was not done; the three samples are the e
|
||||
- **`probe` and `scanloadprobe`** are ad-hoc/self-check phases and were not run.
|
||||
- **MCP `check` on a directory and a glob** cannot be compared: 0.66.2 refuses both.
|
||||
- **Formatter output differences** are counted and sampled, not classified file by file.
|
||||
- **Causes of the three regressions** (parallel formatter peak RSS, `pinmux_reg_top.sv` `didOpen`, `workspace/symbol`) are not established; no bisection was done (the brief allows no checkout besides the baseline worktree).
|
||||
- **Causes of the three regressions** were not established in the main run; the follow-up bisection is in "Regression causes" above (one confirmed, one partly, one a candidate).
|
||||
- **Guard kills: none.** Every guarded command exited by itself.
|
||||
|
||||
## Method and environment
|
||||
|
||||
Reference in new issue
Block a user