From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16918 invoked by alias); 22 Aug 2008 18:29:26 -0000 Received: (qmail 16909 invoked by uid 22791); 22 Aug 2008 18:29:25 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 22 Aug 2008 18:28:42 +0000 Received: from localhost.localdomain ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1KWbNI-0004jn-2b; Fri, 22 Aug 2008 18:28:40 +0000 Message-ID: <48AF0557.D754186C@dessent.net> Date: Fri, 22 Aug 2008 19:35:00 -0000 From: Brian Dessent Reply-To: gcc-help@gcc.gnu.org X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: David Bruant CC: gcc-help@gcc.gnu.org Subject: Re: Question about -fbranch-probabilities References: <48AEF79E.30703@enseirb.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00235.txt.bz2 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