lifter batch: score registered owners inside retained modules (--owner-spans, --sweep) - #7
Closed
wowwheaties wants to merge 1 commit into
Closed
Conversation
…batch `lifter batch` scores each retained module at its extent, but many modules hold more than one registered owner (regions.json manual_regions). Scored at the owner's own span, the unchanged draft often links exact already. - `--owner-spans`: after the module pass, score every registered owner whose start lies inside the module at that owner's span, one row per owner, with an `owner_spans=` summary line (`list --owner-spans` lists them). - `--sweep`: when the owner span is not exact, retry with the span widened to the rest of the module and report both, for owners registered short of the pool island their function really runs to. - trailing pad: a reference one halfword longer than the candidate with no wrong instruction is ranked exact and marked `trailing_pad=1` with the raw count kept in the row; `adopt` still decides on the real bytes. Default output is unchanged without the flags. On this tree `batch --all --owner-spans --sweep` reports 273 owner spans in 187 modules, 47 of them exact from the unchanged draft. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Author
|
Independent check of the 47 |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lifter batchscores each retained module at its extent, but many modules hold more than one registered owner (regions.jsonmanual_regions). Scoring the unchanged draft at the owner's own span instead often links exact already — that observation produced most of the owners in #6, by hand. This makeslifterdo it.--owner-spans(batch, list): after the module pass, score every registered owner whose start lies inside the module at that owner's span; one row per owner (resource_3a2:02000924 span=412 differing_halfwords=6 (module 02000924 extent 1036)) and anowner_spans=… owner_exact=…summary line.--sweep: when the owner span is not exact, retry with the span widened to the rest of the module and report both (sweep_span=… best=owner|sweep), for owners registered short of the pool island their function really runs to (the3c5:02001238/379:02000074shape from ☀️ 74% – adopt seventy-four exact owners on 7d8a72083: eight main-image functions and sixty-six scene sequences #6).wrong_instructions=0is ranked exact and markedtrailing_pad=1with the raw count kept in the row;adoptstill decides on the real bytes.Default output is byte-identical without the flags. No new dependencies;
cargo testandcargo fmt --checkclean;make verifygreen.On this tree (9dbf29f)
lifter batch --all --jobs 8 --owner-spans --sweep: 187 modules, 273 owner spans, 47 exact from the unchanged draft (one of them via the pad rule:3a6:020011a0), 14 spans where the widened sweep scores better than the registered span.Notes
--jobs 8a handful of owner scores come back withno score line(23 here); each scores fine when retried alone. That is the existing scorer subprocess path under load, not new code — left as is rather than adding a retry you might prefer to shape.