cpu-exec: skip idle hot-path bookkeeping#1082
Open
xiaokamikami wants to merge 1 commit into
Open
Conversation
NEMU Performance Results - XS Interpreter
NEMU Performance Results - XS Ref Shared Object
|
dea1487 to
c67be96
Compare
NEMU Performance Results - XS Interpreter
NEMU Performance Results - XS Ref Shared Object
|
c67be96 to
fbdd265
Compare
NEMU Performance Results - XS Interpreter
NEMU Performance Results - XS Ref Shared Object
|
The normal performance path often runs with per-BB profiling, checkpoint generation, and mcontrol6 triggers inactive, but execute, trigger, and basic-block lookup code still paid repeated bookkeeping overhead before discovering that no slow-path work was needed. This keeps guest execution, difftest stepping, trigger semantics, and checkpoint/profiling behavior unchanged. It only avoids entering bookkeeping paths when their controlling runtime state says no work is pending; when profiling, checkpointing, or triggers are active, the existing slow paths remain available. Aggregate measurements with absolute host instructions: - PERF_OPT=ON cumulative node: 111.399B -> 100.030B, CI Change vs Previous (Instructions) +10.21% - PERF_OPT=OFF ref-so-runner 9-workload node: 134.711B -> 127.912B, CI Change vs Previous (Instructions) +5.05%
fbdd265 to
8190608
Compare
NEMU Performance Results - XS Interpreter
NEMU Performance Results - XS Ref Shared Object
|
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.
The normal performance path does not enable per-BB profiling, checkpoint generation, or mcontrol6 triggers, but the execute, trigger, and basic-block lookup paths still paid repeated bookkeeping overhead before discovering that no slow-path work was needed.
Skip per-BB profiling at the call site when all profiling/checkpoint modes are inactive, cache whether any mcontrol6 trigger is active, guard hot trigger call sites before entering the mcontrol6 checker, and use shift-mask arithmetic for power-of-two basic-block hash lookup. On the aggregate fw_payload 1B-instruction workload, this reduces host instructions from 121.896B to 117.077B with PERF_OPT=y, a 3.95% incremental reduction over the previous aggregate node.