This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: VTA merge?
On Sun, Jun 21, 2009 at 7:00 AM, Alexandre Oliva<aoliva@redhat.com> wrote:
> On Jun 18, 2009, Alexandre Oliva <aoliva@redhat.com> wrote:
>
>>> - Memory consumption in cc1/cc1plus at -Ox -g over that set of apps.
>
> I had to use a different machine for this test. The one I was using had
> to be taken off line and moved, for reasons beyond my control, and I
> probably won't be able to get into it to collect the results before I
> hit the road later this week. Sorry.
>
>
> For the total memory uses below, I moved gcc to gcc.actual in both the
> trunk and vta install trees, and installed a new gcc script that ran
> maxmem2.sh $0.actual "$@".
>
> I modified maxmem-pipe2.py to output to a named pipe, and for maxmem2.sh
> to wait for the "cat >&2" from the named pipe to complete, just so that
> I could correlate the memory use output with the command that produced
> it. Without this change, in a number of cases the python script output
> the totals after make had already printed the following command, which
> got the output mangled and confusing.
>
> Having logged the build output of each of the trees that I had
> configured before (-O2 is used for all of them), now with the maxmem
> wrapper, I totaled the "total:" lines it printed for each of the builds,
> resulting the values in the memory column below.
>
> # name mem(KiB) %Δ#1 which gflags
> 1 g0-trunk 58114157 0 trunk -g0
> 2 g0 58114261 0 vta -g0
> 3 g-novt 59722133 2.77 vta -g -fno-$vt -fno-vta
> 4 g-novta 59840445 2.97 vta -g -f$vt -fno-$vta
> 5 g-novt-vta 59764629 2.84 vta -g -fno-$vt -f$vta
> 6 g 59997781 3.24 vta -g -f$vt -f$vta
>
> Conclusions: generating debug information incurred a memory penalty of
> nearly 3% before VTA, for a C-only optimized GCC build.
>
> Carrying VTA notes uses very little memory besides that which is
> required to generate debug info without VT (0.07% more).
>
> Actually using VTA notes to emit debug information in the VT pass
> increases maximum memory use, when compared with VT without VTA, by as
> little as 0.26%.
>
> Wow, this was actually much better than I had anticipated.
The overhead of carrying VTA notes at -g0 vs not doing so would be
the same 0.07%? I'm just curious because I try to be insisting on that
we do exactly this ;)
I wonder if the above figures apply to compiling a C++ application as well
(I see a lot of VTA notes - more than 50% of all tree instructions - when
compiling tramp3d for example).
Thanks,
Richard.