This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Question about -fbranch-probabilities
- From: Brian Dessent <brian at dessent dot net>
- To: David Bruant <bruant at enseirb dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 22 Aug 2008 11:28:39 -0700
- Subject: Re: Question about -fbranch-probabilities
- References: <48AEF79E.30703@enseirb.fr>
- Reply-to: gcc-help at gcc dot gnu dot org
David Bruant wrote:
> I have had an idea which would be to force the end of the algorithm
> thanks to a variable which would end it after 2 hours (for example).
> This way, -fprofile-arcs would have a wide enough sample to improve with
> -fbranch-probabilities, but the "you must use the same source code"
> frightens me because if I add a variable to measure time, it's obviously
> not the same source code.
You could simply install a signal handler that responds to SIGUSR1 or
something and terminates gracefully. Then you can terminate or leave
running indefinitely your application at will without any source level
changes.
Brian