-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
Description
What I did:
- Built the binary
baseline_emit_relocswith-Wl,--emit-relocs - Gathered the profile:
perf record -e cycles:u -j any,u -o perfdata/baseline_emit_relocs.perf.data -p $(pidof baseline_emit_relocs) sleep 20 - Converted the profile into yaml-format with bolt-19 (to which perf2bolt resolves):
perf2bolt baseline_emit_relocs --perfdata=perfdata/baseline_emit_relocs.perf.data --profile-format=yaml -w profiles/baseline_emit_relocs.bolt.yaml -o /dev/null - Bolt-ed the original binary with bolt-18:
llvm-bolt-18 baseline_emit_relocs -o bolted_bat --data=profiles/baseline_emit_relocs.bolt.yaml --reorder-blocks=ext-tsp --reorder-functions=cdsort --split-functions --split-all-cold --split-eh --dyno-stats --update-debug-sections --infer-stale-profile --enable-bat - Gathered the profiled from bolt-ed binary:
perf record -e cycles:u -j any,u -o perfdata/bolted_bat.perf.data -p $(pidof bolted_bat) sleep 20 - Tried to convert the profile into yaml-format with bolt-19 (to which perf2bolt resolves):
perf2bolt bolted_bat --perfdata=perfdata/bolted_bat.perf.data --profile-format=yaml -w profiles/bolted_bat.bolt.yaml -o /dev/null
which resulted in error BOLT-ERROR: failed to parse BOLT address translation table.
So I need
- yaml-format when converting the profile for
--infer-stale-profileto work when bolting the binary later --enable-batwhen bolting the binary for profile collection to work on bolt-ed binary- bolt-19 for converting profiles of bolt-ed binaries into yaml-format (bolt-18 fails with
BOLT-ERROR: unable to save profile in YAML format for input file processed by BOLT. Please remove -w option and use branch profile.)
to enable continuous-bolting in production, but forward-incompatibility of BAT gets in the way.
- Is BAT intended to be compatible between bolt versions?
- If not, are there any ways to convert
perf.dataof bolt-ed binary into.yamlprofile somehow (maybe with additional hops through fdata?) with bolt-18?