This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: What kind of data is collected with -fprofile-generate?
- From: Ian Lance Taylor <iant at google dot com>
- To: Clemens Eisserer <linuxhippy at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 24 Jul 2009 18:17:25 -0700
- Subject: Re: What kind of data is collected with -fprofile-generate?
- References: <194f62550907240646j5dc045ceq6ed194ce9d164b76@mail.gmail.com>
Clemens Eisserer <linuxhippy@gmail.com> writes:
> I've been playing with profile driven optimizations lately and it
> seems to work really well :)
> Even with -mtune=generic I am able to get a 20% time reduction for a
> critical piece of code.
>
> What I wonder however is, how the profiling informations are collected.
>
> E.g. when profiling pixman, I feed about 1Mio trapezoids to it,
> however gcc only collects ~1.5kb profile information for that Object
> file:
>> -rw-rw-r-- 1 ce ce 1784 2009-07-24 15:22 libpixman_1_la-pixman-trap.gcda
>
> It seems irrelevant how much test-data I feed duing the profiling
> stage, it won't grow beyond that 1.7kb.
>
> Any ideas why?
The profiling information collects execution counts. The size scales
with the number of branches in your program. It does not scale with the
amount of data nor how long the program runs.
Ian