diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2021-11-04 13:44:20 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2021-11-04 13:45:04 +0100 |
commit | 17e0a35b87856e065b94c42bb96c8cfd4286c933 (patch) | |
tree | 2fd8d0b92305e9da3cca968c357580501496416b /www-client | |
parent | app-misc/jdupes: bump to v1.20.2 (diff) | |
download | gentoo-17e0a35b87856e065b94c42bb96c8cfd4286c933.tar.gz gentoo-17e0a35b87856e065b94c42bb96c8cfd4286c933.tar.bz2 gentoo-17e0a35b87856e065b94c42bb96c8cfd4286c933.zip |
www-client/firefox: allow access to GPU for USE=pgo
Bug: https://bugs.gentoo.org/821505
Closes: https://bugs.gentoo.org/821526
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'www-client')
-rw-r--r-- | www-client/firefox/firefox-91.3.0.ebuild | 28 | ||||
-rw-r--r-- | www-client/firefox/firefox-94.0.1.ebuild | 28 |
2 files changed, 56 insertions, 0 deletions
diff --git a/www-client/firefox/firefox-91.3.0.ebuild b/www-client/firefox/firefox-91.3.0.ebuild index f425d977b209..18c11799af40 100644 --- a/www-client/firefox/firefox-91.3.0.ebuild +++ b/www-client/firefox/firefox-91.3.0.ebuild @@ -502,6 +502,34 @@ pkg_setup() { # Build system is using /proc/self/oom_score_adj, bug #604394 addpredict /proc/self/oom_score_adj + if use pgo ; then + # Allow access to GPU during PGO run + local ati_cards mesa_cards nvidia_cards render_cards + shopt -s nullglob + + ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') + if [[ -n "${ati_cards}" ]] ; then + addpredict "${ati_cards}" + fi + + mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') + if [[ -n "${mesa_cards}" ]] ; then + addpredict "${mesa_cards}" + fi + + nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') + if [[ -n "${nvidia_cards}" ]] ; then + addpredict "${nvidia_cards}" + fi + + render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') + if [[ -n "${render_cards}" ]] ; then + addpredict "${render_cards}" + fi + + shopt -u nullglob + fi + if ! mountpoint -q /dev/shm ; then # If /dev/shm is not available, configure is known to fail with # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py diff --git a/www-client/firefox/firefox-94.0.1.ebuild b/www-client/firefox/firefox-94.0.1.ebuild index adbc1566ba3e..87394837cc96 100644 --- a/www-client/firefox/firefox-94.0.1.ebuild +++ b/www-client/firefox/firefox-94.0.1.ebuild @@ -502,6 +502,34 @@ pkg_setup() { # Build system is using /proc/self/oom_score_adj, bug #604394 addpredict /proc/self/oom_score_adj + if use pgo ; then + # Allow access to GPU during PGO run + local ati_cards mesa_cards nvidia_cards render_cards + shopt -s nullglob + + ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') + if [[ -n "${ati_cards}" ]] ; then + addpredict "${ati_cards}" + fi + + mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') + if [[ -n "${mesa_cards}" ]] ; then + addpredict "${mesa_cards}" + fi + + nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') + if [[ -n "${nvidia_cards}" ]] ; then + addpredict "${nvidia_cards}" + fi + + render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') + if [[ -n "${render_cards}" ]] ; then + addpredict "${render_cards}" + fi + + shopt -u nullglob + fi + if ! mountpoint -q /dev/shm ; then # If /dev/shm is not available, configure is known to fail with # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py |