Skip to content

LATX, opt: Skip low-value AOT generation - #422

Open
ganjue66da wants to merge 1 commit into
lat-opensource:masterfrom
ganjue66da:codex/aot-low-value-generation
Open

LATX, opt: Skip low-value AOT generation#422
ganjue66da wants to merge 1 commit into
lat-opensource:masterfrom
ganjue66da:codex/aot-low-value-generation

Conversation

@ganjue66da

Copy link
Copy Markdown
Contributor

Motivation

Avoid spending AOT generation time and cache space on translation blocks that are unlikely to provide useful reuse.

Changes

  • Skip low-value AOT generation according to the existing generation heuristics.
  • Keep the change limited to AOT generation policy.

Validation

  • ninja -C build32 latx-i386
  • ninja -C build64 latx-x86_64
  • Both targets built successfully from upstream/master plus this commit.

Scope

This PR contains one optimization commit and no local build output or test artifacts.

Track recovered and dynamically translated TB counts on serialized
translation paths. In automatic mode, generate AOT on exit or before a
TB flush only when dynamic TBs account for at least five percent of all
observed TBs.

Use plain counters to avoid unnecessary atomic operations. Count only
saveable TBs, remove a TB from the counters when it is invalidated, and
keep the runtime count marker out of AOT files. Add LATX_AOT_GENERATE to
force generation on or off when automatic policy is not appropriate.

Signed-off-by: Wenqiang Wei <weiwenqiang@mail.ustc.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant