WIP: perf(linux): the guest memory window at 0x70000000 by default on Linux, so a guest load takes the base in its displacement; Windows opt-in #2711
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2711
Loading…
Reference in a new issue
No description provided.
Delete branch "klimovich008/Longshot:perf/low-memory-base"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Every guest memory access in the lifted code adds the guest window's base, and at 16 TB that base needs a 64-bit
constant, so LLVM keeps it in a register or rebuilds it with
movabs. With the window at 0x70000000 (under 2 GB) thebase fits in the access's own 32-bit displacement, so a guest load is one instruction with no base register.
What changes, per OS:
constant hoisting off (
-mllvm -disable-constant-hoisting); with it on, LLVM kept the base in a register anyway. Thewindow is reserved with
MAP_FIXED_NOREPLACE, with 1 MB of no-access memory below it, so a guest address just under 0still faults.
host/posix/win32_posix.c(also built intolongshot_vk.so) now asks the executable where the windowis (
hos_posix_guest_window()), instead of assuming 16 TB.LONGSHOT_MEMORY_BASE=lowis opt-in. There it reserves the window in twoparts, around Windows' own page at 0x7ffe0000 (KUSER_SHARED_DATA), and links the exe with
/highentropyva:no:with high-entropy ASLR, Windows put heaps inside the window's range in about half of the starts.
HOS_LARGE_PAGESisnot used at the low base.
LONGSHOT_MEMORY_BASE=low|high|<hex>(builder/crates/build-driver/src/stages.rsmemory_base_for). Default:lowon Linux,highon Windows. A bad value stops the build withbad_memory_base.The build log names the base:
the guest window's base: 0x70000000 (...). The build,dev liftandcompilealoneall read the same switch.
fatal: guest_window_refused: ...with the reason, printscannot reserve the guest window (...)and exits 1. Thecrash window reads that as a start that couldn't get its memory. On Linux the reason names the mapping in the way,
vm.mmap_min_addr,vm.overcommit_memory=2orulimit -v; on Windows, the region in the way. There is no runtimefallback, because the lifted code is built for one address.
At a low base the link refuses an ELF of type ET_EXEC (
link::not_pie_at_low_base). The game is PIE today; thisenforces it.
Read first:
stages.rs(memory_base_for),host/hos_main.c(reserve_guest,guest_refused_why,guard_below_guest),build-compile/src/plan.rs(window_flags),build-compile/src/link.rs(
not_pie_at_low_base).Testing
Tested: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2. Built as a pack over main
9eabf8bc3withLONGSHOT_MEMORY_BASE=low, then played. Market child and Lost Woods child, the standard test: every low run loggedmem: the guest window: 512 GB at 0x70000000, and none logged a missing guard. The logs had no error line that acontrol run lacks.
empty image). 10 of 10 real starts reached the title as a player, with AMD Adrenalin's hook, OBS's and Overwolf's
Vulkan hooks loaded: no refusal, no FATAL.
text,
lift.key,a64_config.hand the other lift outputs are identical.200/200 with each of: anonymous, SDL/Vulkan/GL/ALSA loaded first, clang-built. ASLR off, the legacy layout and
bubblewrap: 100/100 each. Non-PIE: 195/200 (the heap was already in the window), which is why the link refuses one.
tests/test_lifter_semantics.py(Windows port),--bases low,high, low with the build's window flags: ok.126,846 runs over 42,375 words, 2,988 edge states and 11,066 sequence runs at the low base; 19,197 memory-word runs at
16 TB.
tests/test_posix_guest_window.py(new, Linux; WSL gcc and clang): pass. The realwin32_posix.cwith astand-in exe whose window is low, high or absent. The broken variant (16 TB fixed, as on main) fails, and main's file
fails it.
cargo fmt --all --checkandcargo clippy --workspace --all-targets --locked -- -D warningsclean overmain
742cf39dd(main'sneedless_borrowinplay.rswas fixed by #2698). New tests pass: build-driverstages::tests,build-compile
a_low_window_turns_constant_hoisting_off_in_the_lifted_units_aloneanda_low_window_refuses_a_fixed_address_linux_executable, and crash's refusal cases. build-driver'scodestest passes(
bad_memory_baseadded tobuild-events.md). The other failures on this PC also fail on main here: build-driver lib8, build-compile 2 toolchain tests and
compile_link's rebuild test, longshot-builder 7.(ffmpeg or dav1d headers, Windows-only files).
-Wallonhos_main.c: no new warnings.tests/run_all.py(mise run test's suite), the whole of it over main742cf39ddwith llvm-mingw: 812 checks, 21 failed, 52 skipped. The same 21 fail on main742cf39ddhere: test_auto_handheld, test_bug_report, test_builder_channel, test_control_picture, test_coverage_run, test_crash_record, test_dev_ab, test_dev_build, test_dev_migrate, test_env_file, test_fs_path_utf8, test_job_queue, test_longshot_ctl, test_oot_menu_mouse, test_oot_state_tap, test_parity_gates, test_perf_send, test_run_all_mingw, test_screensaver, test_switch_table, test_xinput_thread.mise run lint: pass.4380fe96b, whose new commits touch no file of this PR and nothingunder
builder/; host syntax,run_all --changedand lint ran again on it.The open points are in Risks.
Still to test:
mem: the guest window: 512 GB at 0x70000000line on every start (@Beanstalk, the request in the comments).and Flatpak: the game starts and logs the window line. On Linux the display, the Vulkan loader and the Discord thread
start before the window is reserved, so something mapped low first would stop the start (@Beanstalk where the farm
has it, by hand otherwise).
Measurements
Verdict: no gain is claimed. Windows stays opt-in with no claimed gain; Linux is not measured yet.
Setup: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2; Market child, uncapped (
HOS_FPS_MAX=240), the renderthread on; main
9eabf8bc3at 16 TB against this branch built withLONGSHOT_MEMORY_BASE=low, alternating pairs.9eabf8bc3number is not trusted.
Risks
this (host objects too, through
a64_config.h). The shader caches are not touched.overlay, an LD_PRELOAD library), the game doesn't start. It says why and names
LONGSHOT_MEMORY_BASE=high.16 TB; now it could land inside the window. No such path was found. Guest addresses from 2^64 − 0x70000000 to 2^64 −
1 MB reach host memory under the guard.
low: the exe loses high-entropy ASLR; the guest's 64 KB at 0x0FFE0000 reads Windows' systempage instead of faulting;
HOS_LARGE_PAGESis unavailable. A hand-set hex base that starts in that page (0x7ffe0000) is refused by thebuilder (
bad_memory_base, sincee3004442d), and a window running across the page is reserved in two parts.reserve_guest's memfd condition) merges cleanly with this one and its testpasses on the merge. #2692 (WIP, AArch64 Linux) touches
hos_posix_guest_discard,win32_posix.candtest_lifter_semantics.pytoo, so whichever lands second rebases. The displacement gain is an x86-64 one.LONGSHOT_MEMORY_BASE=high. It gives main's lifted code exactly (the same base, nohoisting flag).
mem: the guest window: 512 GB at 0x70000000 (a low base: ...)at every start onLinux.
guest_window_refused,cannot reserve the guest windowormem: no guard below the guest windowmean aproblem.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
The checker's review (sol, m3 phase 1): the refusal went through hos_fatal, whose FATAL line and crash record the crash window shows as "closed unexpectedly", cause unknown; it read the old "cannot reserve the guest window" line as a start that could not have its memory. Now, as the save folder's refusal: the reason in the log ("fatal: guest_window_refused: ..."), then "cannot reserve the guest window (<size> at <base>): <why>" on stderr, a flush, exit 1. The crash facts read both lines (tests). And from the same review: - the highest LONGSHOT_MEMORY_BASE leaves the window under 0x7fff_ffff_0000 (0x7f8000000000 ended at 128 TB, past Linux's TASK_SIZE on four-level paging); - `compile` alone remakes unit texts at the base of the lift gen/ holds (its a64_config.h), not the environment's, so the key check does not refuse a lift made with another base; - dev packs build a pack asked with LONGSHOT_MEMORY_BASE even when no file changed; - test_lifter_semantics compiles the low base's units with the build's window flags (read from plan.rs); - the guard's warning says why it was refused (errno), not "in use". Co-Authored-By: Claude Opus 5.5 <[email protected]>Tested in the game: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2: this branch built with
LONGSHOT_MEMORY_BASE=lowas a pack over main9eabf8bc3, played in Market child and Lost Woods child (the standard test, alternating with main). Every low start loggedmem: the guest window: 512 GB at 0x70000000and no missing-guard line; no error line a main run lacks; 10 of 10 player starts to the title with AMD's, OBS's and Overwolf's hooks loaded. Linux (where this is the default) has not run in the game yet: the Steam Deck was out of reach, so the Test Farm is asked below.@review
@Beanstalk this PR's build against main's at the PR's base (baseline ref = main), Linux only. On Linux the PR moves the guest memory window to 0x70000000 by default (Windows is unchanged), so a Linux start runs different lifted code from main's; nothing needs a switch.
Targets, Linux only, 1-2 reports each, don't let the plan wait on any one of them:
steamdeck), LCD and OLED, if one is online;linux+amd, RADV) and with an NVIDIA GPU (linux+nvidia), on AMD and on Intel CPUs as the testers allow.Settings, both sides: frame_rate_cap = 6 (Uncapped), vsync = 2 (Off), frame_generation = 0. Headless is fine (nothing in the present path changes).
Scenario: Market child, from the save market-entrance (no teleport needed), measure 30 s after 10 s of warm-up, holding the right stick to the right through the measure if the plan can. 3 game starts a side, alternating (2 if the time limit needs it).
Rules, PR against main: crash = false; fps_mean min_delta_pct = 3 (fails on an fps loss over 3 %); frametime_p99_ms max_delta_pct = 9 (fails on a p99 rise over about 9 %). Report-only: frametime_1pct_low_ms, frametime_max_ms, hitch_count, stutter_count, run_hitch_count, run_frametime_max_ms, and the one-start metrics (boot_time, shader_compile, load_time).
Log, log_match on the PR side: expected "mem: the guest window: 512 GB at 0x70000000" with log_expected_missing.max = 0 (main doesn't print it); forbidden "guest_window_refused", "cannot reserve the guest window" and "no guard below the guest window" with log_forbidden_hits.max = 0.
Each tester lifts and compiles the whole game for the PR side (the lift key changes on Linux), so allow the build time; the PR's Linux exe must be PIE, and its link refuses one that isn't.
Beanstalk test farm · an earlier run: commit
8a10967(the newer results are in a comment below)Commit
8a10967· approved by klimovich008 (reviewed) · dashboard⚠️ Note: The step schema cannot hold the right stick during a measure, so the Market measurement is stationary; no teleport or age change is used, so load-time results may be unavailable.
⚠️ Note: Timed lift builds report build stages but do not isolate a player's one-time update cost; the plan does not exercise overlays, Flatpak, or the Windows opt-in path.
⚠️ Note: The normal low-base link enforces PIE, but this plan does not deliberately attempt a non-PIE link; CPU coverage depends on available testers.
Started at 01:16 UTC.
linux+amd+radvlinux+nvidiaCouldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.
linux+amd+radv, report 1:the main base failed (exit 1): The builder stopped on an error: cargo build -p longshot-rs failed: error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured.linux+amd+radv, report 2:the main base failed (exit 1): The builder stopped on an error: cargo build -p longshot-rs failed: Updating crates.io indexWhat was tested
What will be tested · AI plan (
gpt-6.1-terra)Compare the PR with its base main build on Linux AMD RADV and NVIDIA PCs, using three alternating starts per side from the child Market entrance. Each start captures a still image and measures 30 seconds after a 10-second warm-up with uncapped rendering; lift and build stages are also timed. The PR fails on a crash, a missing low-window log, a reservation or guard error, an fps loss over 3%, a p99 frame-time increase over 9%, or a substantial picture difference. Steam Deck is omitted because none is listed online. No tester online now matches linux+nvidia: that target waits for one.
market-entrance(settings vsync=2, frame_rate_cap=6, frame_generation=0), then take the picture market to compare with main, measure market for 30 s (after 10 s warm-up); 3 runs on each side.Measurements on `linux+amd+radv`, for the PR description
Verdict: could not be judged on linux+amd+radv (2 reports).
Hardware: 1: linux+amd+radv+igpu
AMD Radeon 8060S Graphics (RADV STRIX_HALO), 26.99.99AMD RYZEN AI MAX+ 395 w/ Radeon 8060S, 64 GB RAM; 2: linux+amd+radv+dgpuAMD Radeon RX 9070 (RADV GFX1201), 26.0.8AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAMScene: market-child, from the repository's save market-entrance (vsync=2, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-child: 3 game starts a side, market 30 s after 10 s warm-up; timed builds: main and this PR each built 2 times a cache, alternating, each a whole build in a fresh folder (lift; shader preparation not timed); each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Build times (each a median of the timed builds; caches: lift = the lift again (no kept lift, main's compiled objects kept))
4380fe98a10967Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
The testers' hardware
linux+amd+radvAMD Radeon 8060S Graphics (RADV STRIX_HALO), 26.99.99AMD RYZEN AI MAX+ 395 w/ Radeon 8060S, 64 GB RAMlinux+amd+radvAMD Radeon RX 9070 (RADV GFX1201), 26.0.8AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAMRecommendation: Approve. A permitted Windows base can overlap the system page and produce a build that cannot start. The Linux default also has no in-game performance measurement yet, so its benefit remains unproven. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The change builds Linux guest accesses for a low memory window and offers the same layout as a Windows opt-in. It may reduce instruction and register use, but forces a full Linux re-lift and recompile and can refuse startup when the address range is occupied.
Should fix (1): not blocking, but worth doing before merging.
host/hos_main.c:238: The split excludes a base equal to the Windows system page, although the builder accepts that base. (more on the line) Do: Reject Windows bases whose window begins in the system page, or handle that boundary explicitly when reserving the window.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
builder/crates/build-driver/src/stages.rs:290: The Linux default changes every lifted unit without a demonstrated in-game gain. (more on the line) Do: Run the requested interleaved game comparisons on Linux and Steam Deck, including average FPS, 1% lows and frame times, against the base.builder/crates/build-compile/src/plan.rs:906: The compile-time cost of the new lift and compiler flags has not been measured. (more on the line) Do: Compare clean and incremental build time and size against the base, including the one-time update on a Deck.@fixcan do L1.More: does it help, other systems, switches, what was read
Does it help: Unproven. The reported Windows checker runs changed CPU time from 44.20 to 44.00 ms over three pairs and 46.48 to 46.36 ms over two more pairs; the larger reported gain was not reproduced. There are no Linux in-game measurements, including for the default configuration.
Other systems: The low window changes Linux startup and lifted code across GPU vendors, drivers, overlays, containers and Steam Deck. The reported Linux reservation probes use stand-in executables; the real game has been played only on Windows with the opt-in. Windows defaults to the previous base.
Switches: LONGSHOT_MEMORY_BASE adds low, high and hexadecimal build-time choices; it defaults to low on Linux and high on Windows. The Linux default has not yet been supported by in-game measurements. The switch is documented in the build reference but has no row in gpu/vk/switches.def.
Reviewed:
8a10967dfbagainst4380fe96b6: Read the repository rules and PR template, standards, the reservation changes and surrounding host code, the POSIX window lookup, the new POSIX test, the build-base selection and compiler-flag changes, and the supplied comments and measurements. Skimmed the remaining diff and commit history; the full contents of every changed code file and every dependent caller were not read.; nothing run (a code review).Checked and fine:
Testing: No code, tests or project scripts were run, as requested. The PR reports Windows player runs and Linux stand-in reservation tests; the Linux game and hardware runs remain outstanding.
Overlaps and merge order: #2100 touches the reservation path; #2692 overlaps the POSIX guest discard and lifter semantics test. The PR reports that whichever of #2692 and this change lands second must rebase.
Automated code review by BeanBot (gpt-6.1-terra), asked for by klimovich008. Nothing was run; a maintainer decides.
@ -888,0 +903,4 @@/// base gone, 1,903 and 26 three-part accesses down to 148 and none, 3 % fewer instructions). At 16 TB the base cannot be/// a displacement and hoisting saves a 10-byte move a use, so nothing changes there.pub fn window_flags(base: Option<u64>) -> Vec<String> {match base {L3 (should fix): The compile-time cost of the new lift and compiler flags has not been measured.
When: Every existing Linux installation changes lift key and recompiles on update; the time and resulting build size are unknown, particularly on the Deck.
Do: Compare clean and incremental build time and size against the base, including the one-time update on a Deck.
@ -264,0 +287,4 @@let v = value.map(str::trim).unwrap_or_default();let base = match v.to_ascii_lowercase().as_str() {"" => return Ok(if windows { HIGH_MEMORY_BASE } else { LOW_MEMORY_BASE }),"high" => HIGH_MEMORY_BASE,L2 (should fix): The Linux default changes every lifted unit without a demonstrated in-game gain.
When: Linux players receive the low-base code after a full rebuild, but no Linux game run compares its frame times or FPS with the high-base baseline.
Do: Run the requested interleaved game comparisons on Linux and Steam Deck, including average FPS, 1% lows and frame times, against the base.
@ -164,0 +235,4 @@}#endif/* (Windows) the system's own page in every process, KUSER_SHARED_DATA, and whether a low window runs across it */#define WINDOW_SYS_PAGE 0x7ffe0000ULLL1 (should fix): The split excludes a base equal to the Windows system page, although the builder accepts that base.
When: A Windows build with LONGSHOT_MEMORY_BASE=0x7ffe0000 passes memory_base_for, but WINDOW_SPLIT is false. The single VirtualAlloc then includes KUSER_SHARED_DATA and fails, so the resulting game cannot start.
Do: Reject Windows bases whose window begins in the system page, or handle that boundary explicitly when reserving the window.
@fix
I didn't fix this pull request: it doesn't allow edits from maintainers (the author can turn on Allow edits from maintainers).
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Beanstalk test farm
Commit
598793f· approved by nobody yet · dashboardA member of
BigBeanscan review this commit and comment@Beanstalkto test it.New head
e3004442d: BeanBot's L1 fixed, since@fixcouldn't edit this branch.LONGSHOT_MEMORY_BASE=0x7ffe0000withbad_memory_base. A window that starts inside Windows' own page has no part below the page, so the two-part reservation can't go around it. It is the only 64 KB-aligned base inside the page.host/hos_main.calso stops with#errorif a Windows build gets that base some other way. Linux has no such page, so it still takes the base.stages::test covers it: refused on Windows, taken on Linux, and taken on Windows at0x7ffd0000(a window across the page) and at0x7fff0000(right past it).0x70000000and0x7ffd0000, as before. At0x7ffe0000,hos_main.cstops at the#error. The one other failure isnn_video.c, which needs ffmpeg's headers, as on main.build.md's row for the switch says so.stages::3/3 and clippy on build-driver are clean, andmise run lintpasses.linux+amd+radvreports stopped before the game ran. Each stopped on the tester's side while building main's base: rustup had no default toolchain, and the second stopped while updating the crates.io index.linux+nvidiais queued. No Steam Deck is online, and ours is out of reach today.switches.def:LONGSHOT_MEMORY_BASEis a builder switch, read when building, not by the game, so its row is inbuild.mdlike the otherLONGSHOT_*build switches.gpu/vk/switches.deflists the game's runtime switches.🤖 Generated with Claude Code
@review
Description: the risk line on a hand-set Windows base in the system page now says it's refused (
e3004442d, BeanBot L1).Recommendation: Request changes. It conflicts with its base branch: bring it up to date (
@fixor@rebasetry first). (L4) The Windows system-page base is now refused, but the Linux default has no demonstrated in-game gain and its one-time rebuild cost is unmeasured. The Linux comparison and build timings are still needed.The change moves Linux guest memory to a low address and changes compilation to make guest accesses cheaper; Windows retains the high address by default. It adds reservation and compatibility complexity, and every Linux player must re-lift and recompile once.
Blocking (1): must change before merging.
@fixor@rebasetry first). (for the author)Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
builder/crates/build-driver/src/stages.rs:290: The Linux default changes every lifted unit without a demonstrated in-game gain. When: Linux players receive the low-base code after a full rebuild, but no Linux game run compares its frame times or FPS with the high-base baseline. Do: Run the requested interleaved game comparisons on Linux and Steam Deck, including average FPS, 1% lows and frame times, against the base.builder/crates/build-compile/src/plan.rs:906: The compile-time cost of the new lift and compiler flags has not been measured. When: Every existing Linux installation changes lift key and recompiles on update; the time and resulting build size are unknown, particularly on the Deck. Do: Compare clean and incremental build time and size against the base, including the one-time update on a Deck.Since the last review (on
8a10967dfb)Resolved: L1 (The split excludes a base equal to the Windows system page, although the builder accepts t…)
Still open: L2 (The Linux default changes every lifted unit without a demonstrated in-game gain.); L3 (The compile-time cost of the new lift and compiler flags has not been measured.)
New: L4 (It conflicts with its base branch: bring it up to date (
@fixor@rebasetry first).)Checks: Failing on this head, which is behind its base, where it passes:
CI / Third-party parts and guide screenshots (pull_request).@rebase(or@fix) brings it up to date and runs it again; not held against it. Still running: 8 checks.More: does it help, other systems, switches, what was read
Does it help: Unproven. The reported Windows checker measurements improved CPU time by only 0.2 ms and 0.1 ms across five pairs; the larger reported 7.3% result was not reproduced. There is no Linux in-game comparison yet.
Other systems: Linux drivers, overlays, Steam Deck and container environments can occupy the low address range and prevent startup; their game runs remain outstanding. Windows low-base play and starts were reported successful, while its default remains high.
Switches: LONGSHOT_MEMORY_BASE adds low, high and hexadecimal build-time choices: low by default on Linux and high on Windows. The Linux default is not yet supported by performance measurements. The build reference documents the switch and the Windows system-page exclusion.
Reviewed:
e3004442d7against4380fe96b6: Read the changes since the ledger, the relevant base validation, reservation and caller sections, and the pull request's reported results. Skimmed the overall diff and commit list; the other changed files were not read in full. Read AGENTS.md, CONTRIBUTING.md and the pull request template; docs/review-checklist.md is absent.; nothing run (a code review).Checked and fine:
Testing: No commands from the project or tests were run. The author reports Windows game and reservation tests and Linux stand-in reservation tests; Linux game comparison and rebuild timings remain outstanding. CI is still running.
Overlaps and merge order: #2100 touches the reservation path and reportedly merges cleanly; #2692 overlaps host and test files, so whichever lands second needs a rebase.
Automated code review by BeanBot (gpt-6.1-terra), asked for by klimovich008. Nothing was run; a maintainer decides.
22d0d2009into perf/low-memory-base 5f88e05a96New head
598793f30: main22d0d2009merged in (a merge, so the reviewed commits are unchanged), plus one rustfmt commit.Conflicts, and how each was resolved (both sides kept):
build-driver/src/build.rs(compile_only): main's hot split check and its Game/GameOnly-onlylift_textskept; the memory base (from the lift in gen/, else the environment) is now read inside that arm and passed toalone_ask, so the renderer alone and a dry run don't read it either.build-driver/src/stages.rs: the memory-base consts and functions sit beside main'slift_options/lift_options_from, which setso.codegen.memory_baseas before. Main's three new tests moved intostages_tests.rs, theirLiftAskgiven Windows' base.a_windows_lift_asks_what_it_asked_beforenow goes throughlift_options_fromwith no environment and still checks a Windows lift's codegen options equal the lifter's default, so its key and IR are main's.longshot-builder/src/dev/lift_cmd.rs,dev/words.rs:--memory-baseand main's--fp-nan-mid,--fp-nan-mid-broken,--fp-nan-mid-skip,--hot-splitoptions and docs all kept.tests/test_lifter_semantics.py:--basesand the window flags kept with main's--fp-nan-mid,--hot-flags,--hot-splitand--march. Every module (main's NaN-case modules too) is lifted at its base and compiled withcompile_flagsplus the window's flags. The NaN cases run at the first base, whose window the run maps. The inttoptr check runs only on modules that have memory words.598793f30:builder/crates/build-compile/src/host_sources_tests.rsrewritten as rustfmt writes it. On main22d0d2009itself,cargo fmt --all --checkfails on that file. Glad to drop the commit if main fixes it first.I checked every caller of
alone_ask,lift_options,lift_textsand everyLiftAskconstruction after the merge, including main's new tests. Each one gets a memory base.Rerun on the merge (Windows 11 PC, Rust 1.99.1 from mise.toml):
cargo fmt --all --check: passes with the rustfmt commit, and fails on main22d0d2009alone, in host_sources_tests.rs.cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo test --workspace --locked: the branch's failures are the same tests that fail on main22d0d2009here, all Windows-environment ones (toolchain, nup, longshot-builder's profile tests,an_unchanged_rebuild...,matches_llvm_mc). One more,a_lifted_unit_s_text_made_on_demand..., failed once on the branch. In 3 more runs each it passed every time on the branch and failed once on main. The two objects differ only in their COFF timestamp. Thestages::tests pass: memory base, window form, Windows lift and the float middle path.tests/test_lifter_semantics.py(this PC's Windows port of the test, llvm-mingw clang++, Unicorn 2.1.4) passed in three runs:--bases low,high: 126,846 runs over 42,375 words, 19,197 runs of the memory words at 16 TB, the NaN cases at 0x70000000.--bases low --fp-nan-mid --hot-flags --hot-split.--bases low,high --fp-nan-mid --hot-flags --hot-split --march x86-64-v3.hos_main.cstops at the#error. The one other failure isnn_video.c, which needs ffmpeg's headers, as before.tests/run_all.py --changed --jobs 4: 66 checks, covering the PR's files and the merge's. The 5 that fail fail the same way on main22d0d2009here: test_bug_report, test_crash_record, test_dev_build, test_builder_channel, test_oot_state_tap.mise run lint: passes.No game run was repeated for the merge. The PR stays WIP for the farm's Linux run.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.