mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
meson-pgo: initial support for full PGO through headless Sway
This commit is contained in:
parent
ecf1b30d53
commit
5ab1cd3d64
1 changed files with 33 additions and 17 deletions
50
meson-pgo.sh
50
meson-pgo.sh
|
|
@ -12,7 +12,7 @@ if [ -d ${build_dir} ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case ${mode} in
|
case ${mode} in
|
||||||
auto|partial|full)
|
auto|partial|full|full-headless-sway)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
@ -45,6 +45,8 @@ esac
|
||||||
if [ ${mode} = auto ]; then
|
if [ ${mode} = auto ]; then
|
||||||
if [ -n "${WAYLAND_DISPLAY+x}" ]; then
|
if [ -n "${WAYLAND_DISPLAY+x}" ]; then
|
||||||
mode=full
|
mode=full
|
||||||
|
elif command -v sway > /dev/null; then
|
||||||
|
mode=full-headless-sway
|
||||||
else
|
else
|
||||||
mode=partial
|
mode=partial
|
||||||
fi
|
fi
|
||||||
|
|
@ -80,22 +82,36 @@ if [ ${do_pgo} = yes ]; then
|
||||||
trap cleanup EXIT INT HUP TERM
|
trap cleanup EXIT INT HUP TERM
|
||||||
|
|
||||||
cd "${build_dir}"
|
cd "${build_dir}"
|
||||||
if [ ${mode} = full ]; then
|
case ${mode} in
|
||||||
./footclient --version
|
full)
|
||||||
./foot \
|
./footclient --version
|
||||||
--config=/dev/null \
|
./foot \
|
||||||
--term=xterm \
|
--config=/dev/null \
|
||||||
sh -c "${source_dir}/scripts/generate-alt-random-writes.py ${script_options} ${tmp_file} && cat ${tmp_file}"
|
--term=xterm \
|
||||||
else
|
sh -c "${source_dir}/scripts/generate-alt-random-writes.py ${script_options} ${tmp_file} && cat ${tmp_file}"
|
||||||
./footclient --version
|
;;
|
||||||
./foot --version
|
|
||||||
"${source_dir}/scripts/generate-alt-random-writes.py" \
|
full-headless-sway)
|
||||||
--rows=67 \
|
./footclient --version
|
||||||
--cols=135 \
|
sway_conf=$(mktemp)
|
||||||
${script_options} \
|
echo "exec ${build_dir}/foot -o tweak.render-timer=log --config=/dev/null --term=xterm sh -c \"${source_dir}/scripts/generate-alt-random-writes.py ${script_options} ${tmp_file} && cat ${tmp_file}\" && swaymsg exit" > "${sway_conf}"
|
||||||
"${tmp_file}"
|
export WLR_BACKENDS=headless
|
||||||
./pgo "${tmp_file}"
|
sway -c "${sway_conf}"
|
||||||
fi
|
rm "${sway_conf}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
partial)
|
||||||
|
./footclient --version
|
||||||
|
./foot --version
|
||||||
|
"${source_dir}/scripts/generate-alt-random-writes.py" \
|
||||||
|
--rows=67 \
|
||||||
|
--cols=135 \
|
||||||
|
${script_options} \
|
||||||
|
"${tmp_file}"
|
||||||
|
./pgo "${tmp_file}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
cd "${pwd}"
|
cd "${pwd}"
|
||||||
rm "${tmp_file}"
|
rm "${tmp_file}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue