X startup times: Jaunty vs. Moblin

Loïc Minier loic.minier at ubuntu.com
Sun Mar 15 09:38:37 GMT 2009


On Sat, Mar 14, 2009, Bryce Harrington wrote:
> On Sat, Mar 14, 2009 at 06:24:34PM +0100, Lo?c Minier wrote:
> >  Could the default compiler flags in Moblin explain the difference?
> >  (they build everything with -march=core2 -mtune=generic -mfpmath=sse
> >  -Os)
> > 
> >  -Os notably could result in smaller binaries which are loaded faster.
> Sounds plausible to me.  Can you provide the configure string being used
> for xorg-server and for xserver-xorg-video-intel on Moblin?

 Sure, here's how to do it yourself: I downloaded
 http://repo.moblin.org/moblin/development/core/source/xorg-x11-server-1.6.0-1.2.moblin2.src.rpm
 and extracted it (I have a trivial SRPM extraction script attached);
 the %configure line from the .spec file:
%configure --enable-maintainer-mode -disable-xvfb --disable-xnest --disable-kdrive --disable-xephyr --disable-xsdl --disable-xfake --disable-xfbdev --disable-kdrive-vesa --enable-xorg --with-pic --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" --with-module-dir=%{_libdir}/xorg/modules --with-builderstring="Build ID: %{name} %{version}-%{release}" --with-xkb-output=%{_localstatedir}/lib/xkb --with-rgb-path=%{_datadir}/X11/rgb --disable-record --enable-install-libxf86config --disable-xselinux --disable-xinerama --enable-dri2 --enable-dri --with-dri-driver-path=%{_libdir}/dri ${CONFIGURE} 

 Note that the opt flags I mentionned are the default ones in Moblin 2's
 toolchain and typically wont be set in all .spec files.

-- 
Loïc Minier
-------------- next part --------------
#!/bin/sh
# srpm-extract - extract SRPM files into $source-$version/ in their dirs
# Copyright (C) 2009 Loïc Minier <lool at dooz.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# SOFTWARE IN THE PUBLIC INTEREST, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the author shall not be used
# in advertising or otherwise to promote the sale, use or other dealings in
# this Software without prior written authorization from the author.
#
# depends: rpm

set -e

usage() {
    echo "Usage: $(basename "$0") <SRPM> [<SRPM>...]"
}

log() {
    echo "$@" >&2
}

log_i() {
    log "I:" "$@" >&2
}

log_e() {
    log "E:" "$@" >&2
}

die() {
    log_e "$@"
    exit 1
}

if [ $# -eq 0 ]; then
    usage >&2
    exit 1
fi

for srpm; do
    if ! [ -r "$srpm" ]; then
        log_e "Can't read $srpm; skipping"
        continue
    fi

    dir="$(dirname "$srpm")"
    src_ver_rel="$(basename "$srpm" .src.rpm)"
    source=$(echo "$src_ver_rel" | sed -rn 's#^(.+)-[^-]+-[^-]+$#\1#p')
    ver_rel=$(echo "$src_ver_rel" | sed -rn 's#^.+-([^-]+-[^-]+)$#\1#p')

    if [ "$source-$ver_rel.src.rpm" != "$(basename "$srpm")" ]; then
        log_e "Internal error: unrecognized format of filename; skipping"
        continue
    fi

    log_i "Processing $source $ver_rel"
    output_dir="$dir/$source-$ver_rel"
    mkdir -vp "$output_dir"
    if [ -e "$output_dir/$source.spec" ]; then
        log_i "Already extracted; skipping"
        continue
    fi
    rpm2cpio "$srpm" | (cd "$output_dir"; cpio --extract --quiet)
done



More information about the ubuntu-devel mailing list