From: Michael Elizabeth Chastain <mec@shout.net>
To: ac131313@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa] ENUM BITFIELD, here it comes again
Date: Thu, 21 Aug 2003 17:42:00 -0000 [thread overview]
Message-ID: <200308211742.h7LHgNJx028786@duracef.shout.net> (raw)
Okay. Andrew, how is this?
Michael C
2003-08-21 Micahel Chastain <mec@shout.net>
* symtab.h: Add comments about space usage. Identify
the space-critical structures.
Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gdb/symtab.h,v
retrieving revision 1.78
diff -c -3 -p -r1.78 symtab.h
*** symtab.h 20 Aug 2003 17:39:18 -0000 1.78
--- symtab.h 21 Aug 2003 17:40:00 -0000
*************** struct blockvector;
*** 35,47 ****
struct axs_value;
struct agent_expr;
/* Define a structure for the information that is common to all symbol types,
including minimal symbols, partial symbols, and full symbols. In a
multilanguage environment, some language specific information may need to
! be recorded along with each symbol.
! These fields are ordered to encourage good packing, since we frequently
! have tens or hundreds of thousands of these. */
struct general_symbol_info
{
--- 35,70 ----
struct axs_value;
struct agent_expr;
+ /* Some of the structures in this file are space critical.
+ The space-critical structures are:
+
+ struct general_symbol_info
+ struct symbol
+ struct partial_symbol
+
+ These structures are layed out to encourage good packing.
+ They use ENUM_BITFIELD and short int fields, and they order the
+ structure members so that fields less than a word are next
+ to each other so they can be packed together. */
+
+ /* Rearranged: used ENUM_BITFIELD and rearranged field order in
+ all the space critical structures (plus struct minimal_symbol).
+ Memory usage dropped from 99360768 bytes to 90001408 bytes.
+ I measured this with before-and-after tests of
+ "HEAD-old-gdb -readnow HEAD-old-gdb" and
+ "HEAD-new-gdb -readnow HEAD-old-gdb" on native i686-pc-linux-gnu,
+ red hat linux 8, with LD_LIBRARY_PATH=/usr/lib/debug,
+ typing "maint space 1" at the first command prompt.
+ --chastain 2003-08-21 */
+
+
+
/* Define a structure for the information that is common to all symbol types,
including minimal symbols, partial symbols, and full symbols. In a
multilanguage environment, some language specific information may need to
! be recorded along with each symbol. */
! /* This structure is space critical. See space comments at the top. */
struct general_symbol_info
{
*************** struct alias_list
*** 557,562 ****
--- 580,587 ----
struct alias_list *next;
};
+ /* This structure is space critical. See space comments at the top. */
+
struct symbol
{
*************** struct symbol
*** 637,642 ****
--- 662,669 ----
Each partial_symbol sits in a partial_symtab, all of which are chained
on a partial symtab list and which points to the corresponding
normal symtab once the partial_symtab has been referenced. */
+
+ /* This structure is space critical. See space comments at the top. */
struct partial_symbol
{
next reply other threads:[~2003-08-21 17:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-21 17:42 Michael Elizabeth Chastain [this message]
2003-08-21 18:46 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2003-08-21 19:49 Michael Elizabeth Chastain
2003-08-21 18:57 Michael Elizabeth Chastain
2003-08-21 19:19 ` Andrew Cagney
2003-08-20 17:42 Michael Elizabeth Chastain
[not found] <200308201639.h7KGd6BX008220@duracef.shout.net>
2003-08-20 17:36 ` [rfa] ENUM_BITFIELD, " Jim Blandy
2003-08-20 16:49 [rfa] ENUM BITFIELD, " Michael Elizabeth Chastain
2003-08-21 13:48 ` Andrew Cagney
[not found] <200308200249.h7K2ni62029448@duracef.shout.net>
2003-08-20 7:52 ` [rfa] ENUM_BITFIELD, " Jim Blandy
2003-08-20 2:50 Michael Elizabeth Chastain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200308211742.h7LHgNJx028786@duracef.shout.net \
--to=mec@shout.net \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox