"Andi Kleen" <ak@xxxxxxx> writes:
> memory. You can check its memory use with running top during the load.
> gdb also deals very poorly with very big symbol tables (and worse with big
> C++ programs which have very long symbol names too). An useful resource is
> http://www.mozilla.org/unix/debugging-faq.html , it explains some techniques
> that may help.
Oh, and for those who are into stats, before my dwarf2 patch,
debugging a 100 meg executable with dwarf2 info took ~140 meg of
memory, just to load the thing in on start.
You ended up taking a lot more as time progresses.
Now it takes ~80 meg to load the thing in (not too shabby for a 100
meg executable), and you don't end up taking all that much more as
time progresses. Also, most of the 80 meg is shared memory, while none
of the 140 is shared.
I could do a little better, probably shaving it down to 70 or 60 meg,
but i dunno if it'd be worth my trouble.
The main memory user becomes the type structures, which i'm in the
middle of redesigning. Once that is done, memory usage should go down
by an order of magnitude (each C++ type structure is now 52+114 bytes
minimum. If you have 500000 of these, which isn't unusual for a 100
meg executable, you end up with 57 meg of just structure space, not
including the names/etc in that structure).
--Dan
>
> -Andi
|