This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: type/main_type/field size [Re: [patch] static_kind -> bit0, bit1]
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org, Daniel Jacobowitz <drow at false dot org>
- Date: Wed, 08 Oct 2008 17:53:12 -0600
- Subject: Re: type/main_type/field size [Re: [patch] static_kind -> bit0, bit1]
- References: <20080818111120.GE16894@adacore.com> <200808181553.m7IFrG3w005270@d12av02.megacenter.de.ibm.com> <48A59B3C.9050801@net-b.de> <20080818111120.GE16894@adacore.com> <20080907115637.GA12939@host0.dyn.jankratochvil.net> <20080919221221.GA23372@adacore.com> <20080926125754.GC21287@caradoc.them.org> <20081006200928.GD3588@adacore.com> <20081007232111.GA6913@host0.dyn.jankratochvil.net> <20081008033125.GF3810@adacore.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> Once in a while, Tom will post some numbers with each of his size
Joel> improvements. He worked pretty hard at reducing the sizes by some
Joel> bytes, so I'd like to know what he thinks of the increase before
Joel> adding a pointer back (4-8 bytes).
Joel> (2MB seems like a small and reasonable increase to me)
The main_type shrinkage patch was here:
http://sourceware.org/ml/gdb-patches/2008-08/msg00464.html
According to the note this saved about 1% on "gdb -readnow cc1".
However, this is pretty artificial. -readnow is not something normal
users do.
So, offhand I would say that type and main_type are not extremely
size-sensitive.
I suppose it is a judgment call as to whether you would rather use
more memory and have the code be clearer, or whether you would rather
save memory and use a bit to indicate (IIUC) a special dwarf-specific
callback.
Tom