This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about -fbranch-probabilities


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]