[arch-commits] Commit in js78/trunk (PKGBUILD)
Jan Steffens
heftig at archlinux.org
Sat Aug 1 20:21:06 UTC 2020
Date: Saturday, August 1, 2020 @ 20:21:06
Author: heftig
Revision: 393063
PGO
Modified:
js78/trunk/PKGBUILD
----------+
PKGBUILD | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-08-01 19:51:40 UTC (rev 393062)
+++ PKGBUILD 2020-08-01 20:21:06 UTC (rev 393063)
@@ -33,7 +33,6 @@
--disable-strip
--enable-hardening
--enable-linker=lld
- --enable-lto=cross
--enable-optimize
--enable-readline
--enable-release
@@ -53,8 +52,31 @@
cd firefox-$pkgver/obj
- sh ../js/src/configure "${configure_args[@]}"
+ # Do 3-tier PGO
+ echo "Building instrumented JS..."
+ sh ../js/src/configure "${configure_args[@]}" \
+ --enable-profile-generate=cross
make
+
+ echo "Profiling instrumented JS..."
+ (
+ cd ../js/src/octane
+ ../../../obj/dist/bin/js run.js
+ llvm-profdata merge -o ../../../obj/merged.profdata *.profraw
+ )
+
+ stat -c "Profile data found (%s bytes)" merged.profdata
+ test -s merged.profdata
+
+ echo "Removing instrumented JS..."
+ make clobber
+
+ echo "Building optimized JS..."
+ sh ../js/src/configure "${configure_args[@]}" \
+ --enable-lto=cross \
+ --enable-profile-use=cross \
+ --with-pgo-profile-path="$PWD/merged.profdata"
+ make
}
check() {
More information about the arch-commits
mailing list