From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4836 invoked by alias); 28 Jan 2011 18:18:09 -0000 Received: (qmail 4825 invoked by uid 22791); 28 Jan 2011 18:18:08 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from saratoga.rkirkpat.net (HELO saratoga.rkirkpat.net) (206.196.156.29) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Jan 2011 18:18:04 +0000 Received: by saratoga.rkirkpat.net (Postfix, from userid 33) id 12ECA7184C; Fri, 28 Jan 2011 11:18:01 -0700 (MST) From: "Bill McEnaney" To: Anna Sidera , gcc-help@gcc.gnu.org Subject: Re: where my program spends time? X-IPAddress: 67.242.202.73 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Message-Id: <20110128181801.12ECA7184C@saratoga.rkirkpat.net> Date: Fri, 28 Jan 2011 21:28:00 -0000 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: 2011-01/txt/msg00446.txt.bz2 Gprof may help. http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html Bill Anna Sidera wrote: > Hello, > > I wrote a simulation program in gcc that takes 12 hours to finish and I want to make it faster. Can you tell me any way to find what proportion of the time is spend in each line of the program? (like profile in matlab) > > Thanks, > Anna > > ________________________________________________________________ Please visit a saintly hero: http://www.jakemoore.org