public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: where my program spends time?
@ 2011-01-28 21:28 Bill McEnaney
  0 siblings, 0 replies; 4+ messages in thread
From: Bill McEnaney @ 2011-01-28 21:28 UTC (permalink / raw)
  To: Anna Sidera, gcc-help

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: where my program spends time?
  2011-01-28  8:00 Anna Sidera
  2011-01-28  8:34 ` Vyacheslav V. Yurkov
@ 2011-01-28 12:29 ` Cedric Roux
  1 sibling, 0 replies; 4+ messages in thread
From: Cedric Roux @ 2011-01-28 12:29 UTC (permalink / raw)
  To: Anna Sidera; +Cc: gcc-help

On 01/28/2011 08:23 AM, 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

gprof
http://sourceware.org/binutils/docs-2.21/gprof/index.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: where my program spends time?
  2011-01-28  8:00 Anna Sidera
@ 2011-01-28  8:34 ` Vyacheslav V. Yurkov
  2011-01-28 12:29 ` Cedric Roux
  1 sibling, 0 replies; 4+ messages in thread
From: Vyacheslav V. Yurkov @ 2011-01-28  8:34 UTC (permalink / raw)
  To: Anna Sidera; +Cc: gcc-help

On 28.01.2011 10:23, 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
>
>    
Hi Anna,
Use valgrind (cachegrind) and/or oprofile. Note that under profiler 
program runs 20 - 100 times slower.

-- 
Yours sincerely,
Vyacheslav V. Yurkov

^ permalink raw reply	[flat|nested] 4+ messages in thread

* where my program spends time?
@ 2011-01-28  8:00 Anna Sidera
  2011-01-28  8:34 ` Vyacheslav V. Yurkov
  2011-01-28 12:29 ` Cedric Roux
  0 siblings, 2 replies; 4+ messages in thread
From: Anna Sidera @ 2011-01-28  8:00 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-28 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 21:28 where my program spends time? Bill McEnaney
  -- strict thread matches above, loose matches on Subject: below --
2011-01-28  8:00 Anna Sidera
2011-01-28  8:34 ` Vyacheslav V. Yurkov
2011-01-28 12:29 ` Cedric Roux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).