This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: where my program spends time?
- From: "Vyacheslav V. Yurkov" <uvv dot mail at gmail dot com>
- To: Anna Sidera <sidera dot anna at ucy dot ac dot cy>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 28 Jan 2011 11:00:57 +0300
- Subject: Re: where my program spends time?
- References: <f5bbd1fcabcd.4d428b25@ucy.ac.cy>
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