Browse Source
A PGO'd binary can be built as follows:
1. Build with `-DDEVILUTIONX_PROFILE_GENERATE=ON`.
3. Run the timedemo.
4. Build with `-DDEVILUTIONX_PROFILE_USE=ON`.
By default, the profile directory is at `${HOME}/devilutionx-profile`
Example for the RG99:
```bash
# Build the OPK for profiling data collection:
TOOLCHAIN=/opt/rs90-toolchain Packaging/OpenDingux/build.sh rg99 --profile-generate
# Copy the OPK to RG99:
scp -O build-rg99/devilutionx-rg99.opk rg99:/media/sdcard/apps
# Now, run the OPK. It will run the timedemo instead of the actual game and will take a couple of hours.
# ☕☕☕
# Copy the profiling data from RG99
scp -r -O rg99:/media/data/local/home/devilutionx-profile /tmp/devilutionx-profile
# Build the OPK use the collected profiling data:
TOOLCHAIN=/opt/rs90-toolchain Packaging/OpenDingux/build.sh rg99 --profile-use --profile-dir /tmp/devilutionx-profile
# Copy the resulting binary back to RG99
scp -O build-rg99/devilutionx-rg99.opk rg99:/media/sdcard/apps
```
pull/5620/head
5 changed files with 132 additions and 23 deletions
@ -0,0 +1,10 @@
|
||||
#!/bin/sh |
||||
|
||||
set -x |
||||
|
||||
SAVE_DIR="$(mktemp -d)" |
||||
ln -s "${PWD}/demo_0_reference_spawn_0.sv" "${SAVE_DIR}/" |
||||
ln -s "${PWD}/demo_0.dmo" "${SAVE_DIR}/" |
||||
cp "${PWD}/spawn_0.sv" "${SAVE_DIR}/" |
||||
./devilutionx --diablo --spawn --demo 0 --timedemo --save-dir "$SAVE_DIR" --data-dir ~/.local/share/diasurgical/devilution |
||||
rm -rf "$SAVE_DIR" |
||||
Loading…
Reference in new issue