tests: Add Apple Silicon CPU bottleneck benchmarks. - #17
Draft
jungwuk-ryu wants to merge 5 commits into
Draft
Conversation
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
Add a black-box x86-64 Windows microbenchmark suite for identifying CPU-provider bottlenecks on Apple Silicon.
The benchmark follows Apple's CPU-optimization workflow: isolate one processor behaviour, collect repeated in-process measurements, compare baseline and candidate runtimes on the same Mac, and use Instruments CPU Counters or Processor Trace to explain regressions rather than inferring a cause from elapsed time alone.
The workload covers 17 cases across:
RX -> RW -> RXJIT publication withFlushInstructionCache.The Windows executable only uses public Win32 APIs and does not call private Wine, winemac, or xtajit64 entry points, so the same binary can compare two runtime trees.
A macOS runner records the physical host signature, chip, macOS build, power/thermal state, runtime-manifest digest, process timing, context switches, and repeated benchmark output. A separate Python comparator validates log completeness and host/configuration equality, aggregates the median run p50/p95, supports text/Markdown/JSON output, and only applies a regression threshold when explicitly requested.
No chip-specific latency tables, private PMU encodings, or universal M-series thresholds are copied into the repository.
Validation
x86_64-w64-mingw32-gcc -O2under-Wall -Wextra -Werror -Wconversion -Wshadow.bash -non the runner.git diff --checkand./switchyard/verify_source.shin a clean public-source checkout with the proposed files applied.Hardware validation boundary
A physical Apple Silicon Switchyard native-ARM64 runtime was not available in the execution environment used to author this PR. The PR therefore does not claim M-series performance numbers or a runtime speedup. Before marking this ready, run the documented baseline/candidate procedure on the same Mac and inspect any material delta with Instruments.