When profiling, it’s important to know what x86 code the recompiled RISC-V code corresponds to.
For this, you should use the newer perf jitdump interface.
Usage
Start a game with the option enabled:
or simply set it in the Steam profile of the game:# Set APPID to your Steam game id. It can be found in the store page URL
# For example, Half-Life 2 is 220, as seen in its URL: https://store.steampowered.com/app/220/HalfLife_2/
export APPID=220
cat >> ~/.config/felix86/profiles/steam/$APPID.toml <<'EOF'
[Debugging]
perf_jitdump = true
EOF
Then you can capture some samples:
And report, after injecting the emitted jit data:
x86 ELF symbols can also be emitted with FELIX86_PERF_SYMBOLS, although this option is rarely used and is badly optimized.