public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* stabs/dwarf size comparison on CSiBE (Was: stabs support in binutils, gcc, and gdb)
@ 2013-01-15 10:10 Steven Bosscher
  2013-01-15 10:12 ` Steven Bosscher
  2013-01-15 17:53 ` Jan Kratochvil
  0 siblings, 2 replies; 4+ messages in thread
From: Steven Bosscher @ 2013-01-15 10:10 UTC (permalink / raw)
  To: binutils; +Cc: Andreas Schwab, David Taylor, Doug Evans, nick clifton, gcc, gdb

Hello,

In this stabs vs. dwarf discussion, so far it's more been about
assumptions than numbers. So let's throw in some numbers!

The following debug sizes are for CSiBE-v2.1.1 on mipsisa64-elf, with
the LRA branch at r195108. All CSiBE test cases are packages written
in C.

Debug size is computed as the total size of all ".stabs*" or ".debug*"
sections as computed by "size -A" (sysv style size output) on
individual object files (so before linking) and summed up by awk (*).
Tested debug formats are "none", "stabs", "dwarf2", and "dwarf4".
Compiler options were "-Os" for all four tested debug formats. Debug
info was output with "-gstabs", "-gdwarf-2", and "-gdwarf-4".

And the results are:

package         stabs           dwarf2          dwarf4
bzip2-1.0.2     372772          289386          279670
cg_compiler...  1355948         1381734         1314676
compiler        152178          156644          148458
flex-2.5.31     665588          511856          488256
jikespg-1.3     944126          773358          749050
jpeg-6b         3285854         2186640         2110290
libmspack       602692          421792          407070
libpng-1.2.5    1064722         1017116         975098
linux-2.4.23... 53617230        40921246        38353402
lwip-0.5.3...   576260          402830          381902
mpeg2dec-0.3.1  492918          336912          327072
mpgcut-1.1      46956           51854           49490
OpenTCP-1.0.4   873008          223646          212822
replaypc-0.4... 1009322         445296          424136
teem-1.6.0-src  13374436        7259308         6954802
ttt-0.10.1...   208516          113828          109776
unrarlib-0.4.0  91236           79396           75256
zlib-1.1.4      280272          201392          193506
TOTAL           79014034        56774234        53554732
DEBUG/TEXT      16.49           11.85           11.18

(*) the test script actually takes the sum of sizes for all  ".text*",
".stabs*", and ".debug*" sections, and the ".text*" size is subtracted
to get the debug info sizes.


Unless someone can shoot holes in this test approach, the results
suggest that DWARF debug size is *smaller* than stabs, at least for
mipsisa64.

Ciao!
Steven

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

* Re: stabs/dwarf size comparison on CSiBE (Was: stabs support in binutils, gcc, and gdb)
  2013-01-15 10:10 stabs/dwarf size comparison on CSiBE (Was: stabs support in binutils, gcc, and gdb) Steven Bosscher
@ 2013-01-15 10:12 ` Steven Bosscher
  2013-01-15 17:53 ` Jan Kratochvil
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Bosscher @ 2013-01-15 10:12 UTC (permalink / raw)
  To: binutils; +Cc: Andreas Schwab, David Taylor, Doug Evans, nick clifton, gcc, gdb

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

On Tue, Jan 15, 2013 at 11:09 AM, Steven Bosscher wrote:
> Hello,
>
> In this stabs vs. dwarf discussion, so far it's more been about
> assumptions than numbers. So let's throw in some numbers!

Attached are the raw results (with apologies for the Excel sheet :-)

Ciao!
Steven

[-- Attachment #2: mipsisa64-results-size.tar.bz2 --]
[-- Type: application/x-bzip2, Size: 59760 bytes --]

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

* Re: stabs/dwarf size comparison on CSiBE (Was: stabs support in binutils, gcc, and gdb)
  2013-01-15 10:10 stabs/dwarf size comparison on CSiBE (Was: stabs support in binutils, gcc, and gdb) Steven Bosscher
  2013-01-15 10:12 ` Steven Bosscher
@ 2013-01-15 17:53 ` Jan Kratochvil
  2013-01-15 23:27   ` Steven Bosscher
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2013-01-15 17:53 UTC (permalink / raw)
  To: Steven Bosscher
  Cc: binutils, Andreas Schwab, David Taylor, Doug Evans, nick clifton,
	gcc, gdb

On Tue, 15 Jan 2013 11:09:46 +0100, Steven Bosscher wrote:
> Unless someone can shoot holes in this test approach,

While the sum of *.o files sizes may make sense in some cases I would find
more useful to measure it only for the final executables and after they have
been processed by dwz.

Besides dwz also .debug_* sections relocations have large size and all these
relocations get removed in the final executable.


Thanks,
Jan

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

* Re: stabs/dwarf size comparison on CSiBE (Was: stabs support in binutils, gcc, and gdb)
  2013-01-15 17:53 ` Jan Kratochvil
@ 2013-01-15 23:27   ` Steven Bosscher
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Bosscher @ 2013-01-15 23:27 UTC (permalink / raw)
  To: Jan Kratochvil
  Cc: binutils, Andreas Schwab, David Taylor, Doug Evans, nick clifton,
	gcc, gdb

On Tue, Jan 15, 2013 at 6:53 PM, Jan Kratochvil wrote:
> On Tue, 15 Jan 2013 11:09:46 +0100, Steven Bosscher wrote:
>> Unless someone can shoot holes in this test approach,
>
> While the sum of *.o files sizes may make sense in some cases I would find
> more useful to measure it only for the final executables and after they have
> been processed by dwz.
>
> Besides dwz also .debug_* sections relocations have large size and all these
> relocations get removed in the final executable.

I know, but that's not how CSiBE is set up. My numbers bias against
DWARF for the reasons you mention, and the size of the DWARF info
*still* is not nearly an order of magnitude greater than stabs info.

I've posted these numbers in part also to challenge others to show
some benchmarking. I'd like to hear from others how stabs and DWARF
debug sizes compare for $YOUR_FAVORITE_APPLICATION...

Here's some more numbers, this time for gzip-1.5 on
powerpc64-unknown-linux-gnu, compiled with RedHat GCC 4.6.3-2,
compiler options "-O2 -g...".

size of         flags used
debug info      for gzip build
202329          -O2 -gstabs
233109          -O2 -gdwarf-2
218257          -O2 -gdwarf-4
116035          -O2 -gdwarf-4 -fno-var-tracking
171211          -O2 -gdwarf-4 -fno-var-tracking-assignments

Size of debug info is the output of:
 size -A gzip \
   | egrep "\.debug|\.stab" \
   | awk 'BEGIN{sum=0}{sum=sum+$2}END{print sum}'

i.e. on the final executable.

Again, DWARF is nowhere near an order of magnitude larger than stabs
info, as reported by the OP.

Note, I'm not using dwz because I don't think it's a fair comparison
against non-compressed stabs until dwz is made part of the default
tool chain.

Ciao!
Steven

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

end of thread, other threads:[~2013-01-15 23:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-15 10:10 stabs/dwarf size comparison on CSiBE (Was: stabs support in binutils, gcc, and gdb) Steven Bosscher
2013-01-15 10:12 ` Steven Bosscher
2013-01-15 17:53 ` Jan Kratochvil
2013-01-15 23:27   ` Steven Bosscher

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).