summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* scripts/update-keysyms: fix path to the include files after de1b6943dPeter Hutterer2021-05-141-2/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Windows: Pass list of symbols to export to MSVCAdrian Perez de Castro2021-04-271-0/+30
| | | | | | | | | | Arrange for passing .def files with the lists of symbols to export from DLLs when building on Windows with MSVC. Without this no symbols were being exported at all. The .def files are generated from the .map files at build time using scripts/map-to-def, which avoids needing to maintain two different sets of files.
* scripts: update license note in perfect_hash.pyRan Benita2021-04-081-4/+4
| | | | | | Ref: https://github.com/ilanschnell/perfect-hash/issues/5 Signed-off-by: Ran Benita <ran@unusedvar.com>
* keysym: speed up the perfect hash functionRan Benita2021-04-011-1/+3
| | | | | | | | | | | | | Make it use a bit operation instead of an expensive modulo. perf diff: Baseline Delta Abs Shared Object Symbol ........ ......... ................. ................................... 28.15% -6.57% bench-compose [.] xkb_keysym_from_name Signed-off-by: Ran Benita <ran@unusedvar.com>
* keysym: use a perfect hash function for case sensitive xkb_keysym_from_nameRan Benita2021-04-012-7/+709
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 7d84809fdccbb5898d0838849ec7c321410182d5 I added a fast path for the case-sensitive case, but it is still slowing down Compose parsing. Instead of the binary search, use a perfect hash function, computed with a simple python module I found (vendored). It is faster -- perf diff is: Baseline Delta Abs Shared Object Symbol ........ ......... ................. ................................... 22.35% -14.04% libc-2.33.so [.] __strcmp_avx2 16.75% +10.28% bench-compose [.] xkb_keysym_from_name 20.72% +2.40% bench-compose [.] parse.constprop.0 2.29% -1.97% bench-compose [.] strcmp@plt 2.56% +1.81% bench-compose [.] resolve_name 2.37% +0.92% libc-2.33.so [.] __GI_____strtoull_l_internal 26.19% -0.63% bench-compose [.] lex 1.45% +0.56% libc-2.33.so [.] __memchr_avx2 1.13% -0.31% libc-2.33.so [.] __strcpy_avx2 Also reduces the binary size: Before: text data bss dec hex filename 341111 5064 8 346183 54847 build/libxkbcommon.so.0.0.0 After: text data bss dec hex filename 330215 5064 8 335287 51db7 build/libxkbcommon.so.0.0.0 Note however that it's still larger than before 7d84809fdccbb5898d08388: text data bss dec hex filename 320617 5168 8 325793 4f8a1 build/libxkbcommon.so.0.0.0 Signed-off-by: Ran Benita <ran@unusedvar.com>
* keysym: fast path for case sensitive xkb_keysym_from_nameRan Benita2021-03-281-0/+4
| | | | | | | | | | | | | xkb_keysym_from_name() is called a lot in Compose file parsing. The lower case handling slows things down a lot (particularly given we can't use the optimized strcasecmp() due to locale issues). So add separate handling for the non-case-sensitive case which is used by Compose. To do this we need to add another version of the ks_tables table. This adds ~20kb to the shared library binary. We can probably do something better here but I think it's fine. Signed-off-by: Ran Benita <ran@unusedvar.com>
* scripts: remove meson-junit-report.pyRan Benita2021-02-271-92/+0
| | | | | | Not used since ed5a0b4fede69b8e6dc4db53d97ea4ae0a73956d. Signed-off-by: Ran Benita <ran@unusedvar.com>
* scripts: update makeheader script for the _EVDEVK keysym definesPeter Hutterer2021-02-221-0/+11
| | | | | | | | | | | | | | | | | | As of xorgproto commit 5dbb5b76597f [1], the 0x10081XXX keycode range is defined for direct evdev kernel keycode mapping. For example, KEY_MACRO1 (0x290) is mapped to 0x10081290. The format of the #define lines for these keys is stable to allow for parsing: #define XF86XK_FooBar _EVDEVK(0x123) /* optional comment */ Update our script so we detect these new lines. Our keysym generation is a two-step process: makeheader and then makekeys. Replacing the key with its full value in the makeheader script means we don't have to update makekeys to handle the _EVDEVK macro and our header file is fully resolved. [1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/23 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Only add GCC diagnostic pragmas when compiler is GCC compatibleRan Benita2019-12-271-0/+4
| | | | | | Avoid "unknown pragma" warnings on other compilers. Signed-off-by: Ran Benita <ran@unusedvar.com>
* scripts/makeheader: slight simplificationRan Benita2019-10-311-4/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* scripts/makeheader: allow overriding the prefix path of the X11 headersSebastian Wick2019-10-311-5/+9
| | | | | | with X11_HEADERS_PREFIX Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net>
* CI: Publish test results from MesonAdrian Perez de Castro2019-08-091-0/+92
|
* build: make doxygen run from the source treeRan Benita2017-08-011-0/+8
| | | | | | I couldn't find any other way to make this work! Signed-off-by: Ran Benita <ran234@gmail.com>
* build: move custom targets to scripts/ and remove from makefileRan Benita2017-07-314-0/+101
These scripts generate source code that is committed to git and hence do not really belong in the build system. A maintainer runs them as needed. Signed-off-by: Ran Benita <ran234@gmail.com>