- Apr 30, 2021
-
-
Simon McVittie authored
This can be used to create directories, symlinks and zero-byte files, create files as a clone (hard-link or copy) of files in a reference directory, assert that files exist, set executable/non-executable permissions, and set files' modification times. When cloning files from a reference directory, the default is to use the same filename as the destination, but that can be overridden (for example to deal with inconvenient/non-Windows-friendly filenames). This is also actually slightly faster than pv_cheap_tree_copy(), presumably because the manifest is contiguous on-disk and the directories are not necessarily. Setting directories' modification times is implemented, but probably won't work in practice, because any files we create in the directory will alter its mtime. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Apr 28, 2021
-
-
Simon McVittie authored
If we are operating from ./scout_platform_x.y.z, self->id will be NULL. Instead of matching on the names of directories, we can just check whether the deployment we are going to use is the same file (device and inode number) as the old deployment we are considering deleting. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
pressure-vessel: Speed up graphics driver discovery by operating in parallel See merge request !307
-
- Apr 27, 2021
-
-
Simon McVittie authored
This is helpful when trying to reduce this time by parallelizing. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
SrtSystemInfo is not thread-aware, but can safely be handed off from one thread to another, and caches its results internally; so we can use a thread per architecture, plus an extra thread for cross-architecture Vulkan and EGL ICDs, to enumerate graphics drivers and populate the cache in parallel with any other container setup. We join the threads just before looking at their results, to maximize the length of time for which we're running in parallel. On slow hardware (Lenovo T520 circa 2011, with 500G 7200rpm HDD) this cuts something like 20% off the setup time with a cold cache (`echo 3 | sudo tee /proc/sys/vm/drop_caches`). It also has a benefit (more like 15%) with a warm cache, immediately after a previous pressure-vessel run. This does make it somewhat harder to profile pressure-vessel, because when two I/O-bound operations run in parallel, they both take longer than they otherwise would, even though the overall task finishes sooner; this makes it hard to attribute I/O cost to particular actions. The new --single-thread option can be used to get a better idea of where the time is really going. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This encapsulates both the PROVIDER_GRAPHICS_STACK flag and the associated paths: if the object is null then the paths are meaningless, and if the object is non-null then they are meaningful. Making this an immutable "value object" also means we can share it between threads, unlike PvRuntime, which has state. This could become important if we want to make graphics driver enumeration multi-threaded to speed up pressure-vessel. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Add Flatpak version information See merge request !305
-
Simon McVittie authored
runtime: Avoid Wayland when in a Scout container See merge request !306
-
Ludovico de Nittis authored
Unset SDL_VIDEODRIVER if it was previously set to "wayland", when we are in a Scout SteamLinuxRuntime, because Scout is too old to support Wayland. This is not necessary for Soldier or Sniper because we expect it to be working for them. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
If we are in a Flatpak container it can be useful to have the Flatpak version in the system report. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
Move the existing container information from `system-info` to a separate GObject class. In this way it will be easier to expand the amount of information, related to the container that is in use, that we can log. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Simon McVittie authored
pv-runtime: Don't waste time enumerating "extra" graphics drivers See merge request !304
-
- Apr 26, 2021
-
-
Simon McVittie authored
There's no point in doing this when we aren't going to use them. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
These are interesting to a diagnostic tool, but not to pressure-vessel. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
pv-runtime: Avoid opening libraries to determine their SONAME See merge request !301
-
Ludovico de Nittis authored
helpers: Refactor $LIB, $PLATFORM detection See merge request !302
-
Simon McVittie authored
We can make a pretty good guess at what $PLATFORM will be: on many CPU architectures, there is one well-known name for the architecture, and $PLATFORM always takes that value. We might as well try it, even on otherwise unknown architectures - the worst that can happen is that our guess was wrong. Known exceptions include: * ARM 32-bit (Debian's porterboxes are v7l or v8l) * i386 (Meson calls it x86, but $PLATFORM can be i386, i486, i586 or i686) * mips family (Debian's porterboxes are octeon2 or octeon3) * PowerPC (Debian's porterbox is power8) * s390x (Debian's porterbox is z900) * x86_64 ($PLATFORM can sometimes be haswell or xeon_phi) of which we are unlikely to care about the non-x86 cases in practice. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
There's no real reason why we need to hard-code the x86 architectures here - we can do this generically across all multiarch tuples. In particular, this means we detect $LIB correctly on all Debian derivatives and in the freedesktop.org SDK, even on non-x86. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
pressure-vessel is currently x86-only, but we want to be portable to non-x86 if it's easy to do. It's reasonably common for all architectures to use lib, lib32 or lib64 for $LIB. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Generating files in the source directory is ugly, and open-coding the build instructions that we would have generated isn't a whole lot more code. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Add support to detect the expansion of $LIB and $PLATFORM See merge request !297
-
- Apr 22, 2021
-
-
Simon McVittie authored
This is no longer used. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is surprisingly expensive to do, particularly with a cold cache. If we can avoid this, then deleting unwanted libraries from the mutable copy of the runtime becomes a lot faster. With the disk cache cleared and running on slow hardware, this cuts down deletion of the unwanted libraries from 2-4 seconds to basically instantaneous. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Some development libraries follow this pattern, and we already delete those without needing to use libelf to load the library and find out its SONAME: libfcitx-config.so -> libfcitx-config.so.4 libfcitx-config.so.4 -> libfcitx-config.so.4.1 libfcitx-config.so.4.1 However, other libraries follow this pattern, which results in the code that uses libelf to find the SONAME being the only way we can figure out that the .so symlink needs removing: libdbus-glib-1.so -> libdbus-glib-1.so.2.2.2 libdbus-glib-1.so.2 -> libdbus-glib-1.so.2.2.2 libdbus-glib-1.so.2.2.2 To avoid relying on the libelf code path, which is surprisingly slow when run with a cold disk cache, we can do one scan through the directory removing regular files and runtime symlinks, and a second scan through the directory removing development symlinks that have become dangling as a result. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If libfoo.so.0 is a symlink pointing to libfoo.so.0.1.2, and we have overridden libfoo.so.0, then we can know that libfoo.so.0.1.2 is also to be avoided, even without opening it to determine its SONAME. This reduces the need to use libelf, which is surprisingly slow if the disk cache is cold. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we got libbz2.so.1.0 from the host, for which libbz2.so.1 is an alias, we will also want to remove libbz2.so.1 from the container. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The comments here are not really clear enough to express what's going on, particularly in the presence of libraries that have aliases. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We need to 'goto out' to free some arrays of objects, which are too complicated for `__attribute__((__cleanup__))`. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is useful in the same situations rewinddir() is. My use-case right now is to remove some of the files from a directory, then go back through the directory removing symlinks that pointed to those files. Signed-off-by:
Simon McVittie <smcv@collabora.com> Forwarded: https://gitlab.gnome.org/GNOME/libglnx/-/merge_requests/25
-
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
When loading VDPAU modules we rely on $PLATFORM, trying to support all its known possible expansions. However there is always the possibility that we are currently missing some of them or that new ones will be added in the future. For this reason we try to detect the expansion of $PLATFORM, and $LIB, and print its value in the report. In this way it will be easier to notice unusual and/or new expansions. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Simon McVittie authored
runtime: Refactor, add basic profiling See merge request !300
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
As well as making this giant function a bit smaller, this will make it easier to insert profiling markers to see where the time goes. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Apr 21, 2021
-
-
Simon McVittie authored
These refer to the host, but in a Flatpak subsandbox environment the graphics stack provider is not actually the host. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-