forked from wine-mirror/wine
-
Notifications
You must be signed in to change notification settings - Fork 0
xtajit64: batch Unicorn context transfers on Apple Silicon #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jungwuk-ryu
wants to merge
4
commits into
main
Choose a base branch
from
perf/apple-silicon-context-batching
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
730ef63
xtajit64: batch Unicorn context transfers
github-actions[bot] 7cd8af8
test: add Apple Silicon context-transfer benchmark
github-actions[bot] 0c8a418
ci: benchmark xtajit64 context batching on Apple Silicon
jungwuk-ryu 743f2c8
ci: benchmark syscall register batching on Apple Silicon
jungwuk-ryu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: xtajit64 Apple Silicon hot paths | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - ".github/workflows/xtajit64-apple-silicon-hotpaths.yml" | ||
| - "dlls/xtajit64/unixlib.c" | ||
| - "dlls/xtajit64/provider_tests/**" | ||
| push: | ||
| branches: | ||
| - perf/apple-silicon-context-batching | ||
| paths: | ||
| - ".github/workflows/xtajit64-apple-silicon-hotpaths.yml" | ||
| - "dlls/xtajit64/unixlib.c" | ||
| - "dlls/xtajit64/provider_tests/**" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: xtajit64-apple-silicon-hotpaths-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| context-transfer: | ||
| name: Native arm64 context transfer | ||
| runs-on: macos-26 | ||
| timeout-minutes: 30 | ||
|
|
||
| steps: | ||
| - name: Check out source | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Validate source contracts | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| python3 dlls/xtajit64/provider_tests/check_apple_silicon_hotpaths.py \ | ||
| dlls/xtajit64/unixlib.c | ||
| python3 -m py_compile \ | ||
| dlls/xtajit64/provider_tests/check_apple_silicon_hotpaths.py | ||
| bash -n dlls/xtajit64/provider_tests/run_apple_silicon_hotpaths.sh | ||
| bash -n dlls/xtajit64/provider_tests/run_unixlib_concurrency.sh | ||
| git diff --check | ||
|
|
||
| - name: Benchmark pinned Unicorn on native Apple Silicon | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| set -o pipefail | ||
| dlls/xtajit64/provider_tests/run_apple_silicon_hotpaths.sh \ | ||
| "$RUNNER_TEMP/xtajit64-hotpaths" | tee "$RUNNER_TEMP/xtajit64-hotpaths.log" | ||
| grep -E '^(APPLE_SILICON_CPU|APPLE_SILICON_HOTPATH)' \ | ||
| "$RUNNER_TEMP/xtajit64-hotpaths.log" | ||
| { | ||
| echo "## xtajit64 Apple Silicon context-transfer benchmark" | ||
| echo | ||
| echo '```text' | ||
| grep -E '^(APPLE_SILICON_CPU|APPLE_SILICON_HOTPATH)' \ | ||
| "$RUNNER_TEMP/xtajit64-hotpaths.log" | ||
| echo '```' | ||
| } >> "$GITHUB_STEP_SUMMARY" |
64 changes: 64 additions & 0 deletions
64
.github/workflows/xtajit64-apple-silicon-syscall-hotpath.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: xtajit64 Apple Silicon syscall hot path | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - ".github/workflows/xtajit64-apple-silicon-syscall-hotpath.yml" | ||
| - "dlls/xtajit64/**" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: xtajit64-apple-silicon-syscall-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| syscall-register-transfer: | ||
| runs-on: macos-26 | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - name: Check out source | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Verify native Apple Silicon runner | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| test "$(uname -s)" = Darwin | ||
| test "$(uname -m)" = arm64 | ||
| if translated=$(/usr/sbin/sysctl -in sysctl.proc_translated 2>/dev/null); then | ||
| test "$translated" != 1 | ||
| fi | ||
|
|
||
| - name: Verify syscall batching contracts | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| python3 dlls/xtajit64/provider_tests/check_syscall_register_batching.py \ | ||
| dlls/xtajit64/unixlib.c | ||
| python3 -m py_compile \ | ||
| dlls/xtajit64/provider_tests/check_syscall_register_batching.py | ||
| bash -n \ | ||
| dlls/xtajit64/provider_tests/run_apple_silicon_hotpaths.sh \ | ||
| dlls/xtajit64/provider_tests/run_syscall_register_hotpath.sh | ||
|
|
||
| - name: Build Unicorn and benchmark syscall preparation | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| set -o pipefail | ||
| workspace="$RUNNER_TEMP/xtajit64-apple-silicon-syscall" | ||
| dlls/xtajit64/provider_tests/run_apple_silicon_hotpaths.sh \ | ||
| "$workspace" | tee "$RUNNER_TEMP/context-hotpaths.log" | ||
| dlls/xtajit64/provider_tests/run_syscall_register_hotpath.sh \ | ||
| "$workspace" | tee "$RUNNER_TEMP/syscall-hotpaths.log" | ||
| { | ||
| echo "## xtajit64 Apple Silicon syscall register benchmark" | ||
| echo | ||
| echo '```text' | ||
| grep -E '^(APPLE_SILICON_CPU|APPLE_SILICON_HOTPATH)' \ | ||
| "$RUNNER_TEMP/syscall-hotpaths.log" | ||
| echo '```' | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On every pull request touching
dlls/xtajit64/**, this step invokescheck_syscall_register_batching.py, but the reviewed tree contains neither that file nor the subsequently invokedrun_syscall_register_hotpath.sh(a repository-widegit grepfinds only these YAML references). Python therefore exits with a missing-file error before the benchmark starts, making the new workflow fail for every matching PR; add both scripts or remove their invocations.Useful? React with 👍 / 👎.