Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
YMMV: Firefox 3.6.2 64bit with Tracemonkey
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Mon Mar 29, 2010 9:45 pm    Post subject: YMMV: Firefox 3.6.2 64bit with Tracemonkey Reply with quote

Using the patch from http://aur.archlinux.org/packages.php?ID=22296, I now have Firefox running with 64bit Tracemonkey.

My laptop is not particularly fast, it runs the Sunspider tests with the same cflags 3x slower than my desktop machine.

Sunspider-0.9 without the patch:
Quote:
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total: 6496.2ms +/- 1.2%
--------------------------------------------


Sunspider-0.9 with the patch:
Quote:
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total: 2915.6ms +/- 4.1%
--------------------------------------------


Remember to do an about:config in Firefox and enable the jit options.

Now going to give the pgo patches a spin and see if they have any effect. Feedback to follow!
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Tue Mar 30, 2010 9:42 am    Post subject: Reply with quote

...and using the pgo patches...

Sunspider-0.9 results:

Quote:
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total: 1982.8ms +/- 1.1%
--------------------------------------------



So overall...

Quote:
TEST COMPARISON FROM TO DETAILS

=============================================================================

** TOTAL **: 3.28x as fast 6496.2ms +/- 1.2% 1982.8ms +/- 1.1% significant

=============================================================================


So might be worth you giving it a go!
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Tue Mar 30, 2010 1:43 pm    Post subject: Reply with quote

whoa ! that looks really promising 8)

robnotts could you please post your modified mozilla-firefox & xulrunner ebuilds ?

many thanks in advance :)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Tue Mar 30, 2010 2:47 pm    Post subject: Reply with quote

net-libs/xulrunner-1.9.2.2-r1.ebuild

Code:

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/xulrunner/xulrunner-1.9.2.2-r1.ebuild,v 1.1 2010/03/24 22:32:55 nirbheek Exp $

EAPI="2"
WANT_AUTOCONF="2.1"

inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib java-pkg-opt-2 autotools

MY_PV="${PV/_rc/rc}" # Handle beta
MY_PV="${MY_PV/1.9.2/3.6}"
MAJ_PV="1.9.2" # from mozilla-* branch name
PATCH="${PN}-1.9.2-patches-0.4"

DESCRIPTION="Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications"
HOMEPAGE="http://developer.mozilla.org/en/docs/XULRunner"
SRC_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2
        http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
SLOT="1.9"
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
IUSE="+alsa debug libnotify system-sqlite wifi"

RDEPEND="java? ( >=virtual/jre-1.4 )
        >=dev-lang/python-2.3[threads]
        >=sys-devel/binutils-2.16.1
        >=dev-libs/nss-3.12.6                                                   
        >=dev-libs/nspr-4.8                                                     
        system-sqlite? ( >=dev-db/sqlite-3.6.22-r2[fts3,secure-delete] )       
        alsa? ( media-libs/alsa-lib )                                           
        >=app-text/hunspell-1.2                                                 
        >=media-libs/lcms-1.17
        >=x11-libs/cairo-1.8.8[X]
        x11-libs/pango[X]
        x11-libs/libXt
        wifi? ( net-wireless/wireless-tools )
        libnotify? ( >=x11-libs/libnotify-0.4 )"

DEPEND="java? ( >=virtual/jdk-1.4 )
        ${RDEPEND}
        dev-util/pkgconfig"

S="${WORKDIR}/mozilla-${MAJ_PV}"

pkg_setup() {
        # Ensure we always build with C locale.
        export LANG="C"
        export LC_ALL="C"
        export LC_MESSAGES="C"
        export LC_CTYPE="C"

        java-pkg-opt-2_pkg_setup
}

src_prepare() {
        # Apply our patches
        EPATCH_SUFFIX="patch" \
        EPATCH_FORCE="yes" \
        epatch "${WORKDIR}"

        # Fix build error for xpctools
        epatch "${FILESDIR}/301-xulrunner-xpctools.diff"

        # Fix broken mozilla-plugin.pc
        epatch "${FILESDIR}/${PN}-1.9.2-fix-pkgconfig-file.patch"

        # Fix broken media support
        epatch "${FILESDIR}/${PN}-1.9.2-noalsa-fixup.patch"

        # Fix broken alignment
        epatch "${FILESDIR}/1000_fix_alignment.patch"

        # Enable 64bit tracemonkey
        epatch "${FILESDIR}/enable-x86_64-tracemonkey.patch"

        # Enable pgo
        epatch "${FILESDIR}/jemalloc-enable-pgo.patch"
        epatch "${FILESDIR}/potential-pgo-fix.patch"

        # Same as in config/autoconf.mk.in
        MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}"
        SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_PV}/sdk"

        # Gentoo install dirs
        sed -i -e "s:@PV@:${MAJ_PV}:" "${S}"/config/autoconf.mk.in \
                || die "${MAJ_PV} sed failed!"

        # Enable gnomebreakpad
        if use debug ; then
                sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
                        "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
        fi

        eautoreconf

        cd js/src
        eautoreconf
}

src_configure() {
        ####################################
        #
        # mozconfig, CFLAGS and CXXFLAGS setup
        #
        ####################################

        mozconfig_init
        mozconfig_config

        MEXTENSIONS="default"

        MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}"

        # It doesn't compile on alpha without this LDFLAGS
        use alpha && append-ldflags "-Wl,--no-relax"

        mozconfig_annotate '' --with-default-mozilla-five-home="${MOZLIBDIR}"
        mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
        mozconfig_annotate '' --enable-application=xulrunner
        mozconfig_annotate '' --disable-mailnews
        mozconfig_annotate 'broken' --disable-crashreporter
        mozconfig_annotate '' --enable-image-encoder=all
        mozconfig_annotate '' --enable-canvas
        mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
        # Bug 60668: Galeon doesn't build without oji enabled, so enable it
        # regardless of java setting.
        mozconfig_annotate '' --enable-oji --enable-mathml
        mozconfig_annotate 'places' --enable-storage --enable-places
        mozconfig_annotate '' --enable-safe-browsing

        # Build mozdevelop permately
        mozconfig_annotate ''  --enable-jsd --enable-xpctools

        # System-wide install specs
        mozconfig_annotate '' --disable-installer
        mozconfig_annotate '' --disable-updater
        mozconfig_annotate '' --disable-strip
        mozconfig_annotate '' --disable-install-strip

        # Use system libraries
        mozconfig_annotate '' --enable-system-cairo
        mozconfig_annotate '' --enable-system-hunspell
        mozconfig_annotate '' --with-system-nspr
        mozconfig_annotate '' --with-system-nss
        mozconfig_annotate '' --enable-system-lcms
        mozconfig_annotate '' --with-system-bz2

        mozconfig_use_enable libnotify
        mozconfig_use_enable java javaxpcom
        mozconfig_use_enable wifi necko-wifi
        mozconfig_use_enable alsa ogg
        mozconfig_use_enable alsa wave
        mozconfig_use_enable system-sqlite

        # Debug
        if use debug ; then
                mozconfig_annotate 'debug' --disable-optimize
                mozconfig_annotate 'debug' --enable-debug=-ggdb
                mozconfig_annotate 'debug' --enable-debug-modules=all
                mozconfig_annotate 'debug' --enable-debugger-info-modules
        fi

        # Finalize and report settings
        mozconfig_final

        if [[ $(gcc-major-version) -lt 4 ]]; then
                append-flags -fno-stack-protector
        fi

        ####################################
        #
        #  Configure and build
        #
        ####################################

        # Disable no-print-directory
        MAKEOPTS=${MAKEOPTS/--no-print-directory/}

        # Ensure that are plugins dir is enabled as default
        sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
                "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"

        CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
}

src_install() {
        emake DESTDIR="${D}" install || die "emake install failed"

        rm "${D}"/usr/bin/xulrunner

        MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}"
        SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_PV}/sdk"

        dodir /usr/bin
        dosym "${MOZLIBDIR}/xulrunner" "/usr/bin/xulrunner-${MAJ_PV}" || die

        # env.d file for ld search path
        dodir /etc/env.d
        echo "LDPATH=${MOZLIBDIR}" > "${D}"/etc/env.d/08xulrunner || die "env.d failed"

        # Add our defaults to xulrunner and out of firefox
        cp "${FILESDIR}"/xulrunner-default-prefs.js \
                "${D}/${MOZLIBDIR}/defaults/pref/all-gentoo.js" || \
                        die "failed to cp xulrunner-default-prefs.js"

        if use java ; then
                java-pkg_regjar "${D}/${MOZLIBDIR}/javaxpcom.jar"
                java-pkg_regjar "${D}/${SDKDIR}/lib/MozillaGlue.jar"
                java-pkg_regjar "${D}/${SDKDIR}/lib/MozillaInterfaces.jar"
        fi
}

pkg_postinst() {
        ewarn "If firefox fails to start with \"failed to load xpcom\", run revdep-rebuild"
        ewarn "If that does not fix the problem, rebuild dev-libs/nss"
        ewarn "Try dev-util/lafilefixer if you get build failures related to .la files"

        einfo
        einfo "All prefs can be overridden by the user. The preferences are to make"
        einfo "use of xulrunner out of the box on an average system without the user"
        einfo "having to go through and enable the basics."

        einfo
        ewarn "Any package that requires xulrunner:1.9 slot could and most likely will"
        ewarn "have issues. These issues should be reported to maintainer, and mozilla herd"
        ewarn "should be cc'd on the bug report. Thank you anarchy@gentoo.org ."
}


www-client/mozilla-firefox-3.6.2.ebuild

Code:

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.6.2.ebuild,v 1.1 2010/03/24 12:51:04 nirbheek Exp $
EAPI="2"
WANT_AUTOCONF="2.1"

inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib pax-utils fdo-mime autotools mozextension java-pkg-opt-2

LANGS="af ar as be bg bn-BD bn-IN ca cs cy da de el en en-GB en-US eo es-AR
es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gl gu-IN he hi-IN hr hu id is it ja
ka kk kn ko ku lt lv mk ml mr nb-NO nl nn-NO oc or pa-IN pl pt-BR pt-PT rm ro ru
si sk sl sq sr sv-SE ta ta-LK te th tr uk vi zh-CN zh-TW"
NOSHORTLANGS="en-GB es-AR es-CL es-MX pt-BR zh-CN zh-TW"

MAJ_XUL_PV="1.9.2"
MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
DESKTOP_PV="3.6"
MY_PV="${PV/_rc/rc}" # Handle beta for SRC_URI
XUL_PV="${MAJ_XUL_PV}${MAJ_PV/${DESKTOP_PV}/}" # Major + Minor version no.s
PATCH="${PN}-3.6-patches-0.6"

DESCRIPTION="Firefox Web Browser"
HOMEPAGE="http://www.mozilla.com/firefox"

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
SLOT="0"
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
IUSE="+alsa bindist java libnotify system-sqlite wifi"

REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2
        http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"

for X in ${LANGS} ; do
        if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
                SRC_URI="${SRC_URI}
                        linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
        fi
        IUSE="${IUSE} linguas_${X/-/_}"
        # english is handled internally
        if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
                if [ "${X}" != "en-US" ]; then
                        SRC_URI="${SRC_URI}
                                linguas_${X%%-*}? ( ${REL_URI}/${PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
                fi
                IUSE="${IUSE} linguas_${X%%-*}"
        fi
done

RDEPEND="
        >=sys-devel/binutils-2.16.1
        >=dev-libs/nss-3.12.4
        >=dev-libs/nspr-4.8
        >=app-text/hunspell-1.2
        system-sqlite? ( >=dev-db/sqlite-3.6.22-r2[fts3,secure-delete] )
        alsa? ( media-libs/alsa-lib )
        >=x11-libs/cairo-1.8.8[X]
        x11-libs/pango[X]
        wifi? ( net-wireless/wireless-tools )
        libnotify? ( >=x11-libs/libnotify-0.4 )
        ~net-libs/xulrunner-${XUL_PV}[java=,wifi=,libnotify=,system-sqlite=]"

DEPEND="${RDEPEND}
        java? ( >=virtual/jdk-1.4 )
        dev-util/pkgconfig"

RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.4 )"

S="${WORKDIR}/mozilla-1.9.2"

QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"

linguas() {
        local LANG SLANG
        for LANG in ${LINGUAS}; do
                if has ${LANG} en en_US; then
                        has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
                        continue
                elif has ${LANG} ${LANGS//-/_}; then
                        has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
                        continue
                elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
                        for X in ${LANGS}; do
                                if [[ "${X}" == "${LANG}-"* ]] && \
                                        [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
                                        has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
                                        continue 2
                                fi
                        done
                fi
                ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
        done
}

pkg_setup() {
        # Ensure we always build with C locale.
        export LANG="C"
        export LC_ALL="C"
        export LC_MESSAGES="C"
        export LC_CTYPE="C"

        if ! use bindist ; then
                einfo
                elog "You are enabling official branding. You may not redistribute this build"
                elog "to any users on your network or the internet. Doing so puts yourself into"
                elog "a legal problem with Mozilla Foundation"
                elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
        fi

        java-pkg-opt-2_pkg_setup
}

src_unpack() {
        unpack firefox-${MY_PV}.source.tar.bz2 ${PATCH}.tar.bz2

        linguas
        for X in ${linguas}; do
                # FIXME: Add support for unpacking xpis to portage
                [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
        done
}

src_prepare() {
        # Apply our patches
        EPATCH_SUFFIX="patch" \
        EPATCH_FORCE="yes" \
        epatch "${WORKDIR}"

        # Fix media build failure
        epatch "${FILESDIR}/xulrunner-1.9.2-noalsa-fixup.patch"

        # Fix broken alignment
        epatch "${FILESDIR}/1000_fix_alignment.patch"

        # Enable 64bit tracemonkey
        epatch "${FILESDIR}/enable-x86_64-tracemonkey.patch"

        # Enable pgo
        epatch "${FILESDIR}/jemalloc-enable-pgo.patch"
        epatch "${FILESDIR}/potential-pgo-fix.patch"

        eautoreconf

        cd js/src
        eautoreconf
}

src_configure() {
        MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
        MEXTENSIONS="default"

        ####################################
        #
        # mozconfig, CFLAGS and CXXFLAGS setup
        #
        ####################################

        mozconfig_init
        mozconfig_config

        # It doesn't compile on alpha without this LDFLAGS
        use alpha && append-ldflags "-Wl,--no-relax"

        mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
        mozconfig_annotate '' --enable-application=browser
        mozconfig_annotate '' --disable-mailnews
        mozconfig_annotate 'broken' --disable-crashreporter
        mozconfig_annotate '' --enable-image-encoder=all
        mozconfig_annotate '' --enable-canvas
        mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
        # Bug 60668: Galeon doesn't build without oji enabled, so enable it
        # regardless of java setting.
        mozconfig_annotate '' --enable-oji --enable-mathml
        mozconfig_annotate 'places' --enable-storage --enable-places
        mozconfig_annotate '' --enable-safe-browsing

        # Build mozdevelop permately
        mozconfig_annotate ''  --enable-jsd --enable-xpctools

        # System-wide install specs
        mozconfig_annotate '' --disable-installer
        mozconfig_annotate '' --disable-updater
        mozconfig_annotate '' --disable-strip
        mozconfig_annotate '' --disable-install-strip

        # Use system libraries
        mozconfig_annotate '' --enable-system-cairo
        mozconfig_annotate '' --enable-system-hunspell
        mozconfig_annotate '' --with-system-nspr
        mozconfig_annotate '' --with-system-nss
        mozconfig_annotate '' --enable-system-lcms
        mozconfig_annotate '' --with-system-bz2
        mozconfig_annotate '' --with-system-libxul
        mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}

        mozconfig_use_enable libnotify
        mozconfig_use_enable java javaxpcom
        mozconfig_use_enable wifi necko-wifi
        mozconfig_use_enable alsa ogg
        mozconfig_use_enable alsa wave
        mozconfig_use_enable system-sqlite
        mozconfig_use_enable !bindist official-branding

        # Other ff-specific settings
        mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}

        # Finalize and report settings
        mozconfig_final

        if [[ $(gcc-major-version) -lt 4 ]]; then
                append-cxxflags -fno-stack-protector
        fi

        ####################################
        #
        #  Configure and build
        #
        ####################################

        CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
}

src_compile() {
        # Should the build use multiprocessing? Not enabled by default, as it tends to break
        [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
        emake ${jobs} || die
}

src_install() {
        MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"

        emake DESTDIR="${D}" install || die "emake install failed"

        linguas
        for X in ${linguas}; do
                [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
        done

        # Install icon and .desktop for menu entry
        if ! use bindist ; then
                newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
                newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
                        ${PN}-${DESKTOP_PV}.desktop
        else
                newicon "${S}"/browser/branding/unofficial/content/icon48.png firefox-icon-unbranded.png
                newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
                        ${PN}-${DESKTOP_PV}.desktop
                sed -i -e "s:Bon Echo:Namoroka:" \
                        "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop || die "sed failed!"
        fi

        # Add StartupNotify=true bug 237317
        if use startup-notification ; then
                echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop
        fi

        pax-mark m "${D}"/${MOZILLA_FIVE_HOME}/firefox

        # Enable very specific settings not inherited from xulrunner
        cp "${FILESDIR}"/firefox-default-prefs.js \
                "${D}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \
                die "failed to cp firefox-default-prefs.js"

        # Plugins dir
        dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
                || die "failed to symlink"

        # very ugly hack to make firefox not sigbus on sparc
        use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
                                         -i "${D}/${MOZILLA_FIVE_HOME}/application.ini" || \
                                         die "sparc sed failed"; }
}

pkg_postinst() {
        ewarn "All the packages built against ${PN} won't compile,"
        ewarn "any package that fails to build warrants a bug report."
        elog

        # Update mimedb for the new .desktop file
        fdo-mime_desktop_database_update
}


Need to download to the files directories of both the 3 files from http://aur.archlinux.org/packages.php?ID=22296

enable-x86_64-tracemonkey.patch
jemalloc-enable-pgo.patch
potential-pgo-fix.patch


Hope that all helps, Rob.
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Tue Mar 30, 2010 2:53 pm    Post subject: Reply with quote

Anyoen know who the maintainer of the mozilla overlay is? Maybe he can incorporate this into the overlay?
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Tue Mar 30, 2010 9:37 pm    Post subject: Reply with quote

For what it is worth... results for chromium compiled with the same cflags on the same laptop as the above...

Code:
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total:                 1206.0ms +/- 16.2%
--------------------------------------------


Still some catching up for firefox, but at least it is getting there.
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Tue Mar 30, 2010 11:20 pm    Post subject: Reply with quote

nice ! 8)

it didn't make that much of an difference compared to your improvements but it can't be fast enough ;)

thanks !

Quote:
TEST COMPARISON FROM TO DETAILS

=============================================================================

** TOTAL **: 2.12x as fast 1787.2ms +/- 1.9% 841.8ms +/- 1.4% significant

=============================================================================

3d: 1.88x as fast 229.6ms +/- 1.4% 122.0ms +/- 1.9% significant
cube: 1.98x as fast 83.6ms +/- 2.3% 42.2ms +/- 3.8% significant
morph: 2.96x as fast 72.8ms +/- 2.2% 24.6ms +/- 2.8% significant
raytrace: 1.33x as fast 73.2ms +/- 0.8% 55.2ms +/- 1.9% significant

access: 2.89x as fast 301.8ms +/- 2.4% 104.4ms +/- 1.4% significant
binary-trees: *1.07x as slow* 29.4ms +/- 2.3% 31.6ms +/- 2.2% significant
fannkuch: 3.43x as fast 147.0ms +/- 0.0% 42.8ms +/- 1.3% significant
nbody: 4.40x as fast 83.6ms +/- 7.8% 19.0ms +/- 0.0% significant
nsieve: 3.80x as fast 41.8ms +/- 1.3% 11.0ms +/- 8.0% significant

bitops: 7.12x as fast 225.0ms +/- 0.6% 31.6ms +/- 2.2% significant
3bit-bits-in-byte: 40.8x as fast 40.8ms +/- 1.4% 1.0ms +/- 0.0% significant
bits-in-byte: 5.75x as fast 63.2ms +/- 0.9% 11.0ms +/- 0.0% significant
bitwise-and: 23.9x as fast 57.4ms +/- 1.2% 2.4ms +/- 28.4% significant
nsieve-bits: 3.70x as fast 63.6ms +/- 1.1% 17.2ms +/- 3.2% significant

controlflow: ?? 27.8ms +/- 2.0% 28.2ms +/- 2.0% not conclusive: might be *1.01x as slow*
recursive: ?? 27.8ms +/- 2.0% 28.2ms +/- 2.0% not conclusive: might be *1.01x as slow*

crypto: 2.67x as fast 119.6ms +/- 0.6% 44.8ms +/- 4.1% significant
aes: 1.78x as fast 46.6ms +/- 1.5% 26.2ms +/- 6.2% significant
md5: 3.00x as fast 36.0ms +/- 0.0% 12.0ms +/- 0.0% significant
sha1: 5.61x as fast 37.0ms +/- 0.0% 6.6ms +/- 10.3% significant

date: - 128.2ms +/- 1.3% 126.6ms +/- 2.0%
format-tofte: *1.25x as slow* 65.4ms +/- 1.0% 82.0ms +/- 2.8% significant
format-xparb: 1.41x as fast 62.8ms +/- 2.6% 44.6ms +/- 1.5% significant

math: 7.47x as fast 201.6ms +/- 2.8% 27.0ms +/- 3.3% significant
cordic: 8.45x as fast 93.0ms +/- 0.0% 11.0ms +/- 8.0% significant
partial-sums: 6.03x as fast 72.4ms +/- 8.3% 12.0ms +/- 0.0% significant
spectral-norm: 9.05x as fast 36.2ms +/- 1.5% 4.0ms +/- 0.0% significant

regexp: 2.31x as fast 141.2ms +/- 4.3% 61.2ms +/- 6.0% significant
dna: 2.31x as fast 141.2ms +/- 4.3% 61.2ms +/- 6.0% significant

string: 1.39x as fast 412.4ms +/- 6.2% 296.0ms +/- 3.8% significant
base64: 5.53x as fast 44.2ms +/- 11.5% 8.0ms +/- 0.0% significant
fasta: 1.71x as fast 92.6ms +/- 8.7% 54.2ms +/- 2.5% significant
tagcloud: - 80.2ms +/- 5.7% 78.4ms +/- 0.9%
unpack-code: - 141.4ms +/- 15.2% 131.6ms +/- 8.6%
validate-input: 2.27x as fast 54.0ms +/- 6.7% 23.8ms +/- 11.3% significant



both times it was run with JIT enabled

I have to make a clear differentiation:

my results can't be easily compared since the first time it was -custom-optimization (basically Os) the second time with your patches and custom-optimization (O2 + PGO, etc.)

some more results from v8 benchmark:

BEFORE:

Quote:
Score: 335
Richards: 221
DeltaBlue: 297
Crypto: 230
RayTrace: 350
EarleyBoyer: 477
RegExp: 227
Splay: 830

Score: 344
Richards: 237
DeltaBlue: 300
Crypto: 231
RayTrace: 358
EarleyBoyer: 488
RegExp: 237
Splay: 832

Score: 330
Richards: 240
DeltaBlue: 291
Crypto: 231
RayTrace: 311
EarleyBoyer: 469
RegExp: 217
Splay: 830



AFTER:

Quote:
Score: 513
Richards: 1763
DeltaBlue: 110
Crypto: 1600
RayTrace: 372
EarleyBoyer: 405
RegExp: 250
Splay: 802

Score: 488
Richards: 1770
DeltaBlue: 119
Crypto: 1728
RayTrace: 262
EarleyBoyer: 380
RegExp: 231
Splay: 795

Score: 491
Richards: 1765
DeltaBlue: 111
Crypto: 1612
RayTrace: 311
EarleyBoyer: 381
RegExp: 231
Splay: 795

_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D


Last edited by kernelOfTruth on Tue Mar 30, 2010 11:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Tue Mar 30, 2010 11:26 pm    Post subject: Reply with quote

FWIW results of chromium and v8 benchmark:

Quote:
Score: 5834
Richards: 4092
DeltaBlue: 4880
Crypto: 4041
RayTrace: 6768
EarleyBoyer: 15813
RegExp: 2389
Splay: 11149


and the obligatory SunSpider results:

Quote:
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total: 331.6ms +/- 2.3%
--------------------------------------------

3d: 60.6ms +/- 6.1%
cube: 24.0ms +/- 13.2%
morph: 21.4ms +/- 6.6%
raytrace: 15.2ms +/- 22.7%

access: 31.8ms +/- 13.4%
binary-trees: 1.6ms +/- 42.6%
fannkuch: 12.8ms +/- 4.3%
nbody: 12.8ms +/- 21.1%
nsieve: 4.6ms +/- 52.7%

bitops: 25.0ms +/- 3.5%
3bit-bits-in-byte: 2.6ms +/- 26.2%
bits-in-byte: 5.8ms +/- 9.6%
bitwise-and: 9.2ms +/- 6.0%
nsieve-bits: 7.4ms +/- 15.0%

controlflow: 2.2ms +/- 25.3%
recursive: 2.2ms +/- 25.3%

crypto: 14.6ms +/- 4.7%
aes: 8.0ms +/- 0.0%
md5: 3.4ms +/- 20.0%
sha1: 3.2ms +/- 17.4%

date: 56.4ms +/- 11.5%
format-tofte: 20.6ms +/- 5.4%
format-xparb: 35.8ms +/- 21.0%

math: 42.4ms +/- 7.6%
cordic: 18.4ms +/- 24.2%
partial-sums: 17.6ms +/- 9.5%
spectral-norm: 6.4ms +/- 10.6%

regexp: 10.0ms +/- 0.0%
dna: 10.0ms +/- 0.0%

string: 88.6ms +/- 0.8%
base64: 10.4ms +/- 6.5%
fasta: 14.2ms +/- 9.6%
tagcloud: 23.2ms +/- 2.4%
unpack-code: 26.4ms +/- 6.3%
validate-input: 14.4ms +/- 7.7%

_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Mon Apr 05, 2010 11:35 am    Post subject: Reply with quote

Patch continues to work with mozilla-firefox-3.6.3 and xulrunner-1.9.2.3, but as reported in BUG https://bugs.gentoo.org/show_bug.cgi?id=313185 you need to comment out the hunspell patch from the ebuild.
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sun Apr 18, 2010 2:44 pm    Post subject: Reply with quote

I made a local overlay with patched www-client/mozilla-firefox-3.6.3 and net-libs/xulrunner-1.9.2.3 ebuilds. As far as I can tell, the only changes to the ebuilds in this thread are the application of 3 patches, so I applied them to the ebuild in my local overlay. While the TraceMonkey patch enables 64-bit Trace Monkey, the PGO patches are not enabling PGO. They just fix appear to fix some things that would have kept PGO from optimizing Firefox properly if a PGO build was being done.

A real PGO build will compile an instrumented version of Firefox, execute it and then use information from that to compile the optimized version. I have no definite explanation for why the sunspider results improved for the original poster after applying the PGO patches, but there must have been some other variable at work there. There is a Gentoo Linux bug for PGO support:

https://bugs.gentoo.org/show_bug.cgi?id=259062

It appears to be waiting for action from upstream:

https://bugzilla.mozilla.org/show_bug.cgi?id=418866

A slackware user at linuxquestions.org managed to get PGO working in 64-bit firefox:

http://www.linuxquestions.org/questions/linux-software-2/building-firefox-3-6-a-profile-guided-optimization-pgo-automated-build-script-784164/

I made some changes to her build script and managed to build firefox with both TraceMonkey enabled and PGO enabled in the same way mozilla enables it in their nightly builds. It should be fairly trivial to enable it if Gentoo did not build xulrunner and mozilla-firefox separately, but since it does, it appears to be more tricky. The bug report in Gentoo's bugzilla cites upstream as needing to enable PGO when xulrunner and firefox are built separately while the upstream bug does not appear to mention that at all.

I could not tell a difference between Gentoo's vanilla firefox ebuild and the PGO optimized version that the slackware user's script builds under the Sunspider benchmarks until I modified her script to apply the TraceMonkey. After applying the TraceMonkey patch to Xulrunner and Firefox in a local overlay, I could not tell a difference between the modified ebuild and the TraceMonkey-enabled PGO-optimized version. I believe that the slackware user's script was not applying any patches to Firefox until I modified it to apply the TraceMonkey patch, so I am recompiling firefox via the slackware user's script with the PGO patches to see if they make a difference. Unless I see a difference between the modified script without the PGO patches and the modified script with the PGO patches, I think that PGO would not improve performance on Gentoo over the stock build, even with 64-bit TraceMonkey enabled. I know that the mozilla people are seeing improvements from profile guided optimization, but unless this latest build shows an improvement, I will not be able to reproduce their results.

If anyone notices that I missed anything, please let me know.

Edit: The compilation has not finished yet, but it seems that I caught a discrepancy between what I am doing and what upstream is doing. Upstream is using -freorder-blocks-and-partition in order to get improvements from PGO. It seems plausible that without that flag, PGO-firefox builds are no faster than regular firefox builds. This is consistent with upstream's statement that "The improvements in startup stem completely from improved seeking behavior." I am not sure how to modify the slackware user's build script to build an instrumented firefox with -freorder-blocks-and-partition enabled, so I will likely be unable to reproduce upstream's improvements at this time. If anyone has any ideas, please post them. It would be nice if all of this resulted in a PGO use flag for Firefox in portage, plus the TraceMonkey patch which I imagine could be filed as a bug report and be accepted as is.

Edit: It seems that the PGO patches killed Firefox when I built a PGO-version of Firefox with them. I am getting a segmentation fault every time I try running it. jemalloc-enable-pgo.patch appears to undo a bug fix upstream applied to the sources because of an issue jemalloc has with PGO. I am rebuilding Firefox via the slackware build script without that patch to see if potential-pgo-fix.patch will improve performance for the sake of completeness, but my expectation is that there will be no change because everything I have seen so far suggests that PGO is only beneficial if -freorder-blocks-and-partition is being passed to GCC during the initial build.

Edit: It seems that potential-pgo-fix.patch was causing the segmentation faults. The PGO-version of Firefox works fine as long as it is built without it and jemalloc-enable-pgo.patch does not seem to have any negative effect. I was wrong about pgo not improving performance. There are some subtests in sunspider that are clearly benefiting from it, but they are insignificant in terms of their contribution to the overall score that I was considering PGO to not have any effect on performance. Anyway, now that I have compiled a PGO-build with the patch that works, I can say that assuming -freorder-blocks-and-partition will allow me to reproduce the results of upstream's benchmarks, I will need to recompile Firefox by passing -freorder-blocks-and-partition to GCC's initial build to get improvements that significantly effect the overall score and unless that is possible with separate xulrunner and firefox ebuilds, Gentoo is not missing much by not having PGO enabled.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sun Apr 18, 2010 6:40 pm    Post subject: Reply with quote

I asked in the Mozilla Bugzilla bug report for details on how upstream is passing -freorder-blocks-and-partition to GCC's initial build so I can reproduce their results. I am waiting on them before I do anything else with PGO.

I wanted to get TraceMonkey support for 64-bit systems in portage, but I determined that the PGO patches recommended above are either useless or harmful, so I filed a bug report on Gentoo's Bugzilla with only the patch that enables TraceMonkey support.

I am hoping the maintainer for Mozilla Firefox will put this patch into portage because it would eliminate the need for us to maintain local overlays.
Back to top
View user's profile Send private message
Anarchy
Developer
Developer


Joined: 29 Jun 2005
Posts: 135

PostPosted: Sun Apr 18, 2010 7:07 pm    Post subject: Reply with quote

Shining Arcanine wrote:
I asked in the Mozilla Bugzilla bug report for details on how upstream is passing -freorder-blocks-and-partition to GCC's initial build so I can reproduce their results. I am waiting on them before I do anything else with PGO.

I wanted to get TraceMonkey support for 64-bit systems in portage, but I determined that the PGO patches recommended above are either useless or harmful, so I filed a bug report on Gentoo's Bugzilla with only the patch that enables TraceMonkey support.

I am hoping the maintainer for Mozilla Firefox will put this patch into portage because it would eliminate the need for us to maintain local overlays.


I have been working on tracemonkey for sometime now, and have support for tracemonkey already enabled in 3.7a5 along with corrosponding xulrunner. The same will happen with current ~testing once we finish the security bump. You must pass --enable-tracejit in order to enable tracemonkey. This can only be passed based on archs that actually support it.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sun Apr 18, 2010 7:42 pm    Post subject: Reply with quote

Anarchy wrote:
Shining Arcanine wrote:
I asked in the Mozilla Bugzilla bug report for details on how upstream is passing -freorder-blocks-and-partition to GCC's initial build so I can reproduce their results. I am waiting on them before I do anything else with PGO.

I wanted to get TraceMonkey support for 64-bit systems in portage, but I determined that the PGO patches recommended above are either useless or harmful, so I filed a bug report on Gentoo's Bugzilla with only the patch that enables TraceMonkey support.

I am hoping the maintainer for Mozilla Firefox will put this patch into portage because it would eliminate the need for us to maintain local overlays.


I have been working on tracemonkey for sometime now, and have support for tracemonkey already enabled in 3.7a5 along with corrosponding xulrunner. The same will happen with current ~testing once we finish the security bump. You must pass --enable-tracejit in order to enable tracemonkey. This can only be passed based on archs that actually support it.


This is the first time I have heard of --enable-tracejit. I recompiled Firefox with it and there was no change in Sunspider results over the stock ebuild, which suggests that TraceMonkey is not enabled by passing that flag. Perhaps it applies to Firefox 3.7a5 and not Firefox 3.6.3.

According to other people here and the benchmarks I have run, Firefox 3.6.3 appears to have x86_64 TraceMonkey support in its code, but it requires a light patch to enable it. My bugzilla bug report has everything necessary to enable it. enable-x86_64-tracemonkey.patch must be put into both mozilla-firefox's and xulrunner's files directory and the patches need to be applied to the ebuilds, but after doing that, TraceMonkey should be on by default on amd64 architectures.
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Wed Apr 21, 2010 4:22 pm    Post subject: Reply with quote

Glad to see people are getting some use out of this. For info, I was motivated to try this when I tried one of the 3.7betas and found that TraceMonkey was enabled by default. However, 3.7beta wasn't usable due to crashing flash plugin (I know... I know... it's a load of.... but necessary).

When I get chance, I'll update my local ebuild to not use the pgo patches if they are useless. Shame no one included the patches in an overlay (I did email), but never mind.

Rob.
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
dweezil-n0xad
Apprentice
Apprentice


Joined: 30 Oct 2006
Posts: 156
Location: Ostend, Belgium

PostPosted: Thu Apr 22, 2010 1:50 pm    Post subject: Reply with quote

robnotts wrote:
Glad to see people are getting some use out of this. For info, I was motivated to try this when I tried one of the 3.7betas and found that TraceMonkey was enabled by default. However, 3.7beta wasn't usable due to crashing flash plugin (I know... I know... it's a load of.... but necessary).
I had to set dom.ipc.plugins.enabled to false in about:config to get a working flash plugin in 3.7beta.
_________________
i7-4790K | 16GB DDR3 | GTX 970 | 500GB SSD
ASUS N56VV | i7-3630QM | 12GB DDR3 | GT 750M | 256GB SSD
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Thu Apr 22, 2010 5:11 pm    Post subject: Reply with quote

Quote:
I had to set dom.ipc.plugins.enabled to false in about:config to get a working flash plugin in 3.7beta.


cheers for that... will give it a go if i get tempted to try 3.7 again... waiting for 3.6.4beta to see if that is any good
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Sun Apr 25, 2010 12:39 am    Post subject: Reply with quote

for what it is worth, I am now running mozilla-firefox-3.6.3 on 3 machines...

machine 1 - amd phenom II 955 quad-core... my house/mythtv server, so machine needs to be stable...

Code:
CFLAGS="-O2 -march=native -ftree-vectorize -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"
CPPFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"


machine 2 - amd turion x2... laptop which I use day to day, so needs to be reasonably stable, but also use to experiment with bits and pieces...

Code:
CFLAGS="-O2 -march=native -ftree-vectorize -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"
CPPFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"


but have overides in /etc/portage/env for various bits and pieces of (and feel free to criticise)...

Code:
CFLAGS="-O2 -march=native -floop-interchange -floop-strip-mine -floop-block -ftree-vectorize -ftree-loop-linear -ftree-loop-distribution -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"
CPPFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"


mainly media-gfx/* media-libs/* media-plugins/* media-sound/* media-video/* net-libs/xulrunner www-client/mozilla-firefox

machine 3 as above but with a single core turion processor.

All 3 machines are running in 64bit mode, and all solid as a solid thing.
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Wed Jun 23, 2010 12:36 pm    Post subject: Reply with quote

Just to keep you all updated, the enable tracemonkey patch works on mozilla-firefox-3.6.4, with just the patch line added to the ebuild.

SunSpider benchmarks, pre and post patch.

=============================================================================

** TOTAL **: 2.63x as fast 5171.8ms +/- 2.7% 1966.4ms +/- 0.4% significant

=============================================================================
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Wed Jun 23, 2010 2:25 pm    Post subject: Reply with quote

robnotts wrote:
Just to keep you all updated, the enable tracemonkey patch works on mozilla-firefox-3.6.4, with just the patch line added to the ebuild.

SunSpider benchmarks, pre and post patch.

=============================================================================

** TOTAL **: 2.63x as fast 5171.8ms +/- 2.7% 1966.4ms +/- 0.4% significant

=============================================================================


thanks for the notice robnotts ! :)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Wed Jun 23, 2010 3:49 pm    Post subject: Reply with quote

/usr/local/portage/net-libs/xulrunner/xulrunner-1.9.2.4-r1.ebuild wrote:
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/xulrunner/xulrunner-1.9.2.2-r1.ebuild,v 1.1 2010/03/24 22:32:55 nirbheek Exp $

EAPI="2"
WANT_AUTOCONF="2.1"

inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib java-pkg-opt-2 autotools

MY_PV="${PV/_rc/rc}" # Handle beta
MY_PV="${MY_PV/1.9.2/3.6}"
MAJ_PV="1.9.2" # from mozilla-* branch name
PATCH="${PN}-1.9.2-patches-0.4"

DESCRIPTION="Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications"
HOMEPAGE="http://developer.mozilla.org/en/docs/XULRunner"
SRC_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2
http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
SLOT="1.9"
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
IUSE="+alsa debug libnotify system-sqlite wifi"

RDEPEND="java? ( >=virtual/jre-1.4 )
>=dev-lang/python-2.3[threads]
>=sys-devel/binutils-2.16.1
>=dev-libs/nss-3.12.6
>=dev-libs/nspr-4.8
system-sqlite? ( >=dev-db/sqlite-3.6.22-r2[fts3,secure-delete] )
alsa? ( media-libs/alsa-lib )
>=app-text/hunspell-1.2
>=media-libs/lcms-1.17
>=x11-libs/cairo-1.8.8[X]
x11-libs/pango[X]
x11-libs/libXt
wifi? ( net-wireless/wireless-tools )
libnotify? ( >=x11-libs/libnotify-0.4 )"

DEPEND="java? ( >=virtual/jdk-1.4 )
${RDEPEND}
dev-util/pkgconfig"

S="${WORKDIR}/mozilla-${MAJ_PV}"

pkg_setup() {
# Ensure we always build with C locale.
export LANG="C"
export LC_ALL="C"
export LC_MESSAGES="C"
export LC_CTYPE="C"

java-pkg-opt-2_pkg_setup
}

src_prepare() {
# Apply our patches
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"

# Fix build error for xpctools
epatch "${FILESDIR}/301-xulrunner-xpctools.diff"

# Fix broken mozilla-plugin.pc
epatch "${FILESDIR}/${PN}-1.9.2-fix-pkgconfig-file.patch"

# Fix broken media support
epatch "${FILESDIR}/${PN}-1.9.2-noalsa-fixup.patch"

# Fix broken alignment
epatch "${FILESDIR}/1000_fix_alignment.patch"

# Enable 64bit tracemonkey
epatch "${FILESDIR}/enable-x86_64-tracemonkey.patch"

# Enable pgo
epatch "${FILESDIR}/jemalloc-enable-pgo.patch"
epatch "${FILESDIR}/potential-pgo-fix.patch"

# Same as in config/autoconf.mk.in
MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}"
SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_PV}/sdk"

# Gentoo install dirs
sed -i -e "s:@PV@:${MAJ_PV}:" "${S}"/config/autoconf.mk.in \
|| die "${MAJ_PV} sed failed!"

# Enable gnomebreakpad
if use debug ; then
sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
"${S}"/build/unix/run-mozilla.sh || die "sed failed!"
fi

eautoreconf

cd js/src
eautoreconf
}

src_configure() {
####################################
#
# mozconfig, CFLAGS and CXXFLAGS setup
#
####################################

mozconfig_init
mozconfig_config

MEXTENSIONS="default"

MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}"

# It doesn't compile on alpha without this LDFLAGS
use alpha && append-ldflags "-Wl,--no-relax"

mozconfig_annotate '' --with-default-mozilla-five-home="${MOZLIBDIR}"
mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
mozconfig_annotate '' --enable-application=xulrunner
mozconfig_annotate '' --disable-mailnews
mozconfig_annotate 'broken' --disable-crashreporter
mozconfig_annotate '' --enable-image-encoder=all
mozconfig_annotate '' --enable-canvas
mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
# Bug 60668: Galeon doesn't build without oji enabled, so enable it
# regardless of java setting.
mozconfig_annotate '' --enable-oji --enable-mathml
mozconfig_annotate 'places' --enable-storage --enable-places
mozconfig_annotate '' --enable-safe-browsing

# Build mozdevelop permately
mozconfig_annotate '' --enable-jsd --enable-xpctools

# System-wide install specs
mozconfig_annotate '' --disable-installer
mozconfig_annotate '' --disable-updater
mozconfig_annotate '' --disable-strip
mozconfig_annotate '' --disable-install-strip

# Use system libraries
mozconfig_annotate '' --enable-system-cairo
mozconfig_annotate '' --enable-system-hunspell
mozconfig_annotate '' --with-system-nspr
mozconfig_annotate '' --with-system-nss
mozconfig_annotate '' --enable-system-lcms
mozconfig_annotate '' --with-system-bz2

mozconfig_use_enable libnotify
mozconfig_use_enable java javaxpcom
mozconfig_use_enable wifi necko-wifi
mozconfig_use_enable alsa ogg
mozconfig_use_enable alsa wave
mozconfig_use_enable system-sqlite

# Debug
if use debug ; then
mozconfig_annotate 'debug' --disable-optimize
mozconfig_annotate 'debug' --enable-debug=-ggdb
mozconfig_annotate 'debug' --enable-debug-modules=all
mozconfig_annotate 'debug' --enable-debugger-info-modules
fi

# Finalize and report settings
mozconfig_final

if [[ $(gcc-major-version) -lt 4 ]]; then
append-flags -fno-stack-protector
fi

####################################
#
# Configure and build
#
####################################

# Disable no-print-directory
MAKEOPTS=${MAKEOPTS/--no-print-directory/}

# Ensure that are plugins dir is enabled as default
sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"

CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
}

src_install() {
emake DESTDIR="${D}" install || die "emake install failed"

rm "${D}"/usr/bin/xulrunner

MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}"
SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_PV}/sdk"

dodir /usr/bin
dosym "${MOZLIBDIR}/xulrunner" "/usr/bin/xulrunner-${MAJ_PV}" || die

# env.d file for ld search path
dodir /etc/env.d
echo "LDPATH=${MOZLIBDIR}" > "${D}"/etc/env.d/08xulrunner || die "env.d failed"

# Add our defaults to xulrunner and out of firefox
cp "${FILESDIR}"/xulrunner-default-prefs.js \
"${D}/${MOZLIBDIR}/defaults/pref/all-gentoo.js" || \
die "failed to cp xulrunner-default-prefs.js"

if use java ; then
java-pkg_regjar "${D}/${MOZLIBDIR}/javaxpcom.jar"
java-pkg_regjar "${D}/${SDKDIR}/lib/MozillaGlue.jar"
java-pkg_regjar "${D}/${SDKDIR}/lib/MozillaInterfaces.jar"
fi
}

pkg_postinst() {
ewarn "If firefox fails to start with \"failed to load xpcom\", run revdep-rebuild"
ewarn "If that does not fix the problem, rebuild dev-libs/nss"
ewarn "Try dev-util/lafilefixer if you get build failures related to .la files"

einfo
einfo "All prefs can be overridden by the user. The preferences are to make"
einfo "use of xulrunner out of the box on an average system without the user"
einfo "having to go through and enable the basics."

einfo
ewarn "Any package that requires xulrunner:1.9 slot could and most likely will"
ewarn "have issues. These issues should be reported to maintainer, and mozilla herd"
ewarn "should be cc'd on the bug report. Thank you anarchy@gentoo.org ."
}


/usr/local/portage/www-client/mozilla-firefox/mozilla-firefox-3.6.4-r1.ebuild wrote:
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.6.2.ebuild,v 1.1 2010/03/24 12:51:04 nirbheek Exp $
EAPI="2"
WANT_AUTOCONF="2.1"

inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib pax-utils fdo-mime autotools mozextension java-pkg-opt-2

LANGS="de en en-GB en-US"
NOSHORTLANGS="en-GB es-AR es-CL es-MX pt-BR zh-CN zh-TW"

MAJ_XUL_PV="1.9.2"
MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
DESKTOP_PV="3.6"
MY_PV="${PV/_rc/rc}" # Handle beta for SRC_URI
XUL_PV="${MAJ_XUL_PV}${MAJ_PV/${DESKTOP_PV}/}" # Major + Minor version no.s
PATCH="${PN}-3.6-patches-0.6"

DESCRIPTION="Firefox Web Browser"
HOMEPAGE="http://www.mozilla.com/firefox"

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
SLOT="0"
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
IUSE="+alsa bindist java libnotify system-sqlite wifi"

REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2
http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"

for X in ${LANGS} ; do
if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
SRC_URI="${SRC_URI}
linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
fi
IUSE="${IUSE} linguas_${X/-/_}"
# english is handled internally
if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
if [ "${X}" != "en-US" ]; then
SRC_URI="${SRC_URI}
linguas_${X%%-*}? ( ${REL_URI}/${PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
fi
IUSE="${IUSE} linguas_${X%%-*}"
fi
done

RDEPEND="
>=sys-devel/binutils-2.16.1
>=dev-libs/nss-3.12.4
>=dev-libs/nspr-4.8
>=app-text/hunspell-1.2
system-sqlite? ( >=dev-db/sqlite-3.6.22-r2[fts3,secure-delete] )
alsa? ( media-libs/alsa-lib )
>=x11-libs/cairo-1.8.8[X]
x11-libs/pango[X]
wifi? ( net-wireless/wireless-tools )
libnotify? ( >=x11-libs/libnotify-0.4 )
~net-libs/xulrunner-${XUL_PV}[java=,wifi=,libnotify=,system-sqlite=]"

DEPEND="${RDEPEND}
java? ( >=virtual/jdk-1.4 )
dev-util/pkgconfig"

RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.4 )"

S="${WORKDIR}/mozilla-1.9.2"

QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"

linguas() {
local LANG SLANG
for LANG in ${LINGUAS}; do
if has ${LANG} en en_US; then
has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
continue
elif has ${LANG} ${LANGS//-/_}; then
has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
continue
elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
for X in ${LANGS}; do
if [[ "${X}" == "${LANG}-"* ]] && \
[[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
continue 2
fi
done
fi
ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
done
}

pkg_setup() {
# Ensure we always build with C locale.
export LANG="C"
export LC_ALL="C"
export LC_MESSAGES="C"
export LC_CTYPE="C"

if ! use bindist ; then
einfo
elog "You are enabling official branding. You may not redistribute this build"
elog "to any users on your network or the internet. Doing so puts yourself into"
elog "a legal problem with Mozilla Foundation"
elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
fi

java-pkg-opt-2_pkg_setup
}

src_unpack() {
unpack firefox-${MY_PV}.source.tar.bz2 ${PATCH}.tar.bz2

linguas
for X in ${linguas}; do
# FIXME: Add support for unpacking xpis to portage
[[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
done
}

src_prepare() {
# Apply our patches
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_EXCLUDE="137-bz460917_att350845_reload_new_plugins-gentoo-update.patch" \
epatch "${WORKDIR}"

# The patch excluded above failed, ported patch is applied below
epatch "${FILESDIR}/137-bz460917_reload_new_plugins-gentoo-update-3.6.4.patch"

# Fix media build failure
epatch "${FILESDIR}/xulrunner-1.9.2-noalsa-fixup.patch"

# Fix broken alignment
epatch "${FILESDIR}/1000_fix_alignment.patch"

# Enable 64bit tracemonkey
epatch "${FILESDIR}/enable-x86_64-tracemonkey.patch"

# Enable pgo
epatch "${FILESDIR}/jemalloc-enable-pgo.patch"
epatch "${FILESDIR}/potential-pgo-fix.patch"

# Allow user to apply additional patches without modifing ebuild
epatch_user

eautoreconf

cd js/src
eautoreconf
}

src_configure() {
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
MEXTENSIONS="default"

####################################
#
# mozconfig, CFLAGS and CXXFLAGS setup
#
####################################

mozconfig_init
mozconfig_config

# It doesn't compile on alpha without this LDFLAGS
use alpha && append-ldflags "-Wl,--no-relax"

mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
mozconfig_annotate '' --enable-application=browser
mozconfig_annotate '' --disable-mailnews
mozconfig_annotate 'broken' --disable-crashreporter
mozconfig_annotate '' --enable-image-encoder=all
mozconfig_annotate '' --enable-canvas
mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
# Bug 60668: Galeon doesn't build without oji enabled, so enable it
# regardless of java setting.
mozconfig_annotate '' --enable-oji --enable-mathml
mozconfig_annotate 'places' --enable-storage --enable-places
mozconfig_annotate '' --enable-safe-browsing

# Build mozdevelop permately
mozconfig_annotate '' --enable-jsd --enable-xpctools

# System-wide install specs
mozconfig_annotate '' --disable-installer
mozconfig_annotate '' --disable-updater
mozconfig_annotate '' --disable-strip
mozconfig_annotate '' --disable-install-strip

# Use system libraries
mozconfig_annotate '' --enable-system-cairo
mozconfig_annotate '' --enable-system-hunspell
mozconfig_annotate '' --with-system-nspr
mozconfig_annotate '' --with-system-nss
mozconfig_annotate '' --enable-system-lcms
mozconfig_annotate '' --with-system-bz2
mozconfig_annotate '' --with-system-libxul
mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}

mozconfig_use_enable libnotify
mozconfig_use_enable java javaxpcom
mozconfig_use_enable wifi necko-wifi
mozconfig_use_enable alsa ogg
mozconfig_use_enable alsa wave
mozconfig_use_enable system-sqlite
mozconfig_use_enable !bindist official-branding

# Other ff-specific settings
mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}

# Finalize and report settings
mozconfig_final

if [[ $(gcc-major-version) -lt 4 ]]; then
append-cxxflags -fno-stack-protector
fi

####################################
#
# Configure and build
#
####################################

CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
}

src_compile() {
# Should the build use multiprocessing? Not enabled by default, as it tends to break
[ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
emake ${jobs} || die
}

src_install() {
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"

emake DESTDIR="${D}" install || die "emake install failed"

linguas
for X in ${linguas}; do
[[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
done

# Install icon and .desktop for menu entry
if ! use bindist ; then
newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
${PN}-${DESKTOP_PV}.desktop
else
newicon "${S}"/browser/branding/unofficial/content/icon48.png firefox-icon-unbranded.png
newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
${PN}-${DESKTOP_PV}.desktop
sed -i -e "s:Bon Echo:Namoroka:" \
"${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop || die "sed failed!"
fi

# Add StartupNotify=true bug 237317
if use startup-notification ; then
echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop
fi

pax-mark m "${D}"/${MOZILLA_FIVE_HOME}/firefox

# Enable very specific settings not inherited from xulrunner
cp "${FILESDIR}"/firefox-default-prefs.js \
"${D}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \
die "failed to cp firefox-default-prefs.js"

# Plugins dir
dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
|| die "failed to symlink"

# very ugly hack to make firefox not sigbus on sparc
use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
-i "${D}/${MOZILLA_FIVE_HOME}/application.ini" || \
die "sparc sed failed"; }
}

pkg_postinst() {
ewarn "All the packages built against ${PN} won't compile,"
ewarn "any package that fails to build warrants a bug report."
elog

# Update mimedb for the new .desktop file
fdo-mime_desktop_database_update
}

_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum