Commit graph

4753 commits

Author SHA1 Message Date
Daniel Eklöf
b6df5f6456
pgo.sh: set -x *after* verifying input 2021-09-12 16:11:42 +02:00
Daniel Eklöf
7e53de263b
pkgbuild: add back --prefix --wrap-mode=nofallback 2021-09-12 10:39:45 +02:00
Daniel Eklöf
e77c3b3e4f
pkgbuild: add ‘auto’ to the list of possible PGO values 2021-09-12 10:39:45 +02:00
Daniel Eklöf
5493267bf7
pgo: pgo.sh: remove both gcc and clang generated profile stats 2021-09-12 10:39:45 +02:00
Daniel Eklöf
2181af0552
pkgbuild: the pgo script erases the old profdata files 2021-09-12 10:39:45 +02:00
Daniel Eklöf
a941253ba7
pgo: pgo.sh: add meson bld/src dir arguments last 2021-09-12 10:39:45 +02:00
Daniel Eklöf
6d67c2b4ab
pgo: pgo.sh: run ‘find’ in the build-directory, not cwd 2021-09-12 10:39:45 +02:00
Daniel Eklöf
e907ec209c
pgo: pgo.sh: allow a pre-existing build directory 2021-09-12 10:39:45 +02:00
Daniel Eklöf
579e1f80b4
pkgbuild: build using pgo/pgo.sh 2021-09-12 10:39:44 +02:00
Daniel Eklöf
cf7c5050f6
pgo: pgo.sh: auto: don’t use full-headless-sway
This requires Sway >= 1.6.2, which hasn’t been released yet. Thus,
don’t auto-use it.

Users can still request it explicitly.
2021-09-12 10:39:44 +02:00
Daniel Eklöf
99c4e51e19
pgo: add set -x to all PGO scripts
Without this, debugging error reports from users is going to be _very_
difficult...
2021-09-12 10:39:44 +02:00
Daniel Eklöf
f25055f101
pgo: full-headless-cage: remove references to Sway 2021-09-12 10:39:44 +02:00
Daniel Eklöf
801bce335b
pgo: full-headless-cage: new headless variant
Appears to work, but cage spams a lot of

 00:00:08.026 [types/wlr_output.c:720] Basic output test failed for HEADLESS-1
 00:00:08.036 [types/wlr_output.c:720] Basic output test failed for HEADLESS-1
2021-09-12 10:39:44 +02:00
Daniel Eklöf
3a34b94f2e
pgo: full-inner: quote path in trap’s “rm” command 2021-09-12 10:39:44 +02:00
Daniel Eklöf
aeb510182b
pgo: full-inner: remove -o tweak.render-timer=log 2021-09-12 10:39:44 +02:00
Daniel Eklöf
a43ae0d098
pgo: replace meson-pgo.sh with several script primitives
All scripts are in the ‘pgo’ directory:

* options: command line options for generate-alt-random-writes.py,
  sourced by other scripts.

* pgo.sh: top-level script, generates a meson build directory, selects
  a PGO method, generates the profiling data, re-configures the meson
  build directory and does the final build.

  This script is intended to be used by end-users, and shows _how_ to
  integrate the script primitives.

  Build servers will most likely *not* want to use this script as-is.

* partial.sh: generates alt-random-write data and runs “foot{,client}
  --version”, and then feeds the alt-random data to the PGO helper
  binary. Does not require a running Wayland session. Touches
  $blddir/pgo-ok on success.

* full-inner.sh: runs “footclient --version”, and then a complex
  “foot” command that first generates alt-random-write data, and then
  “cat’s” it. Requires a running Wayland session, *but*, this script
  is usually not called directly (see below). Touches $blddir/pgo-ok
  onsucces..

* full-current-session.sh: runs full-inner.sh. That is, it runs foot
  in the currently running Wayland session. Note that this will pop up a
  foot window.

* full-headless-sway.sh: generates a custom Sway configuration that
  exec’s foot-headless-sway-inner.sh (see below), and then executes a
  headless Sway. In other words, this script does a *full* PGO build,
  but *without* requiring a running Wayland session. Requires Sway >=
  1.6.2.

* full-headless-sway.sh: runs full-inner.sh + “swaymsg exit”.

To do a custom PGO build, without using pgo.sh, you’d need to:

CFLAGS=”$CFLAGS -O3” meson --buildtype=release -Db_lto=true
meson configure -Db_pgo=generate
ninja
ninja test (only needed if tllist+fcft are built as subprojects)

Run *one* of:
  - partial.sh
  - full-current-session.sh
  - full-headless-sway.sh

meson configure -D b_pgo=use
ninja
2021-09-12 10:39:43 +02:00
Daniel Eklöf
540310924b
meson-pgo: document limitations/requirements 2021-09-12 10:39:43 +02:00
Daniel Eklöf
87b68f23cb
meson-pgo: headless-sway: export XDG_RUNTIME_DIR 2021-09-12 10:39:43 +02:00
Daniel Eklöf
098f2c0c88
meson-pgo: use as little path quoting as possible 2021-09-12 10:39:43 +02:00
Daniel Eklöf
575f9135ae
meson-pgo: do mode validation and mode evaluation at the same time 2021-09-12 10:39:43 +02:00
Daniel Eklöf
ac9b3025d8
meson-pgo: improved argument validation 2021-09-12 10:39:43 +02:00
Daniel Eklöf
a3b6ecf3b2
meson-pgo: add mode=none 2021-09-12 10:39:43 +02:00
Daniel Eklöf
8ea6c93515
meson-pgo: ‘auto’ now prefers full-headless-sway 2021-09-12 10:39:43 +02:00
Daniel Eklöf
5ab1cd3d64
meson-pgo: initial support for full PGO through headless Sway 2021-09-12 10:39:42 +02:00
Daniel Eklöf
ecf1b30d53
meson-pgo: remove debug output 2021-09-12 10:39:42 +02:00
Daniel Eklöf
ffc6fd7e03
meson-pgo: realpath() on build dir too 2021-09-12 10:39:42 +02:00
Daniel Eklöf
996356983b
meson-pgo: initial version of a meson wrapper script for PGO builds
Usage: meson-pgo.sh auto|partial|full <source-dir> <build-dir> <meson-options>

Note: build-dir must *not* exist before the script is run (but if it
does, the script will tell you so, and exit).

Supported compilers: gcc and clang

The script does *not* add _any_ custom meson options, except configure
-Db_pgo. Thus, you probably want to call it like this:

  meson-pgo.sh auto . /tmp/foot-pgo-build --buildtype=release -Db_lto=true
2021-09-12 10:39:42 +02:00
Daniel Eklöf
729cbc3ffd
Merge branch 'gnome-pointer-button-workaround'
Closes #709
2021-09-12 10:33:04 +02:00
Daniel Eklöf
e553e1076c
input: workaround GNOME issue with pointer button events
Under certain circumstances, GNOME will send multiple pointer button
press events, without any release or leave events in between.

This trips up our button tracking.

Workaround, by replacing the existing state for the pressed button
with the new state.

Previously, debug builds would assert (and thus crash), while release
builds would have multiple states for the same button,
causing (probably) issues like the title bar not being usable (as in,
cannot be dragged, buttons not working etc).

Hopefully closes #709
2021-09-12 10:32:22 +02:00
Daniel Eklöf
4853bcd139
Merge branch 'default-section-is-main' 2021-09-09 21:50:04 +02:00
Arnavion
b26fda7ef0 doc: Document that the default section can be reopened as [main] 2021-09-08 22:42:58 -07:00
Daniel Eklöf
d126662560
term: reduce scope of variable 2021-09-05 12:39:25 +02:00
Daniel Eklöf
b1a4d43845
sixel: call decsixel() directly, instead of going through sixel_put() 2021-09-05 11:09:45 +02:00
Daniel Eklöf
47c32d5913
sixel: avoid looking up color from palette for each sixel
Instead, do the palette lookup when we receive the DECGCI (i.e. when
the palette entry is selected), and store the actual color value in
our sixel struct.
2021-09-05 11:08:13 +02:00
Daniel Eklöf
f9642e9597
sixel: calculate default bg once, in init
We have all information we need to calculate the default background
color in sixel_init():

* Whether the image have transparency or not
* The current ANSI background color
2021-09-05 10:27:13 +02:00
Daniel Eklöf
f39a62fa5e
server: no need to clone the config to handle -N,--no-wait 2021-09-05 09:28:19 +02:00
Daniel Eklöf
26859a5168
render: unref clip region 2021-09-04 20:08:23 +02:00
Daniel Eklöf
32bceaa786
Merge branch 'check-font-is-monospace'
Closes #704
2021-09-03 20:52:44 +02:00
Daniel Eklöf
73b488a2b2
config: codespell: setting has only two ‘t’ 2021-08-31 20:01:35 +02:00
Daniel Eklöf
e51e085d7a
changelog: check if primary font is monospaced 2021-08-31 19:58:35 +02:00
Daniel Eklöf
1233e000f0
server: verify primary font is monospaced
... unless we’re re-using the main conf as-is, in which case we will
already have done this (and the conf’s user-notification list will
already contain a warning).
2021-08-31 19:58:35 +02:00
Daniel Eklöf
8ffc556d44
main: verify primary font is monospaced at startup
Load a couple of ASCII glyphs and check if their advance widths
matches. If not, warn the user that the font is probably not
monospaced.

This can be disabled by setting tweak.font-monospace-warn=no.

Closes #704.
2021-08-31 19:58:35 +02:00
Daniel Eklöf
bb948d03e1
terminal: prefer the advance width of ‘M’ over that of a space
This makes some non-monospaced fonts more readable, allowing users to
read errors and warnings printed in the window.

Furthermore, fcft-3.0 will remove the space_advance member, so once we
upgrade, we’ll have to rasterize a glyph ourselves anyway.
2021-08-31 19:56:59 +02:00
Craig Barnes
f26251d3bd Merge branch 'csi-cleanup' 2021-08-30 21:35:06 +01:00
Daniel Eklöf
83c8eeb575
changelog: terminfo changes 2021-08-30 20:31:28 +02:00
Daniel Eklöf
fe0b348f89
pkgbuild: fix terminfo package install location 2021-08-30 20:20:37 +02:00
Daniel Eklöf
173bb805c2
pkgbuild: line-wrap meson configure command line 2021-08-30 20:20:12 +02:00
Daniel Eklöf
55433d7797
install: terminfo: pipe sed output to tic
Related to #700
2021-08-30 19:42:02 +02:00
Daniel Eklöf
051745d7b1
install: document how to manually pre-process the terminfo source file
Related to #700
2021-08-30 19:35:56 +02:00
Daniel Eklöf
cf767427d7
pkgbuild: fix terminfo removal 2021-08-30 19:33:22 +02:00