Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-portage-dev
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-portage-dev@g.o
From: Paul de Vrieze <pauldv@g.o>
Subject: Re: src_profile() request for comments
Date: Wed, 28 Sep 2005 17:27:09 +0200
On Wednesday 28 September 2005 17:10, Jason Stubbs wrote:
> On Wednesday 28 September 2005 23:42, Bastian Balthazar Bux wrote:
> > with src_profile() responsible to do basically two things:
> > - run the builded app with some fake data
> > - rebuild the source using the gathered profile info.
> >
> > The first step within some ebuilds could be done by src_test, the
> > second is basically a reduced src_compile.
> >
> > any thoughts ?
>
>        -fno-guess-branch-probability
>            Do not guess branch probabilities using a randomized model.
>
>            Sometimes GCC will opt to use a randomized model to guess
> branch probabilities, when none are available from either profiling
> feed- back (-fprofile-arcs) or __builtin_expect.  This means that
> differ- ent runs of the compiler on the same program may produce
> different object code.
>
>            In a hard real-time system, people don't want different runs
> of the compiler to produce code that has different behavior; minimizing
> non-determinism is of paramount import.  This switch allows users to
> reduce non-determinism, possibly at the expense of inferior
> optimization.
>
>            The default is -fguess-branch-probability at levels -O, -O2,
> -O3, -Os.
>
> Any "test data" that could be used to automatically profile is
> essentially just a randomized model. So it would seem gcc has it
> inbuilt already.

The difference is that the randomized model used by gcc is not based on 
possible input to the program (as that might be very big), but on 
possible input to more lowlevel concepts such as functions (or even the 
condition statement). As such test data, if reasonably representative of 
actual data for the application, would give a rather accurate profile of 
the branching probabilities and program paths. The more data the better 
of course.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@g.o
Homepage: http://www.devrieze.net
Attachment:
pgputI7hIcTxE.pgp (PGP signature)
Replies:
Re: src_profile() request for comments
-- Jason Stubbs
References:
src_profile() request for comments
-- Bastian Balthazar Bux
Re: src_profile() request for comments
-- Jason Stubbs
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: src_profile() request for comments
Next by thread:
Re: src_profile() request for comments
Previous by date:
Re: src_profile() request for comments
Next by date:
Re: src_profile() request for comments


Updated Jun 17, 2009

Summary: Archive of the gentoo-portage-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.