Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [rfa:symtab] SYMBOL_LOCATION_FUNCS -> SYMBOL_OPS
Date: Sat, 08 Nov 2003 21:31:00 -0000	[thread overview]
Message-ID: <20031108213118.GA29731@nevyn.them.org> (raw)
In-Reply-To: <3FAD53AD.4030003@gnu.org>

On Sat, Nov 08, 2003 at 03:35:57PM -0500, Andrew Cagney wrote:
> Hello,
> 
> This patch generalizes the per-symbol location_funcs, replacing them 
> with a symbol_ops vector (the contents are unchanged).  The patch 
> doesn't change the size of the symbol.
> 
> As the comment hints:
> 
> +  /* NOTE: cagney/2003-11-02: The fields "aclass" and "ops" contain
> +     overlaping information.  Since GDB has only a small finite number
> +     of symbol classes it should be possible to merge the two fields
> +     into a single ops-table "index".  Each entry providing both the
> +     "ops" and the "aclass" values.  Doing that would shave 32 bits
> +     off every symbol.  */
> 
> The patch sets us up for a more significant change - merge "ops" and 
> "aclass" - and hence eliminates 32 bits (or 20%) of each symbol.  I 
> should note that right now the details of the merge are "left as an 
> exercise for the reader".

FWIW, this patch looks good to me.  I only have two questions.  One is
with the generalized name - do you expect anything besides the location
(the aclass really is a part of the location, I think) to be handled by
these ops?  I'm not sure what else there is, so it's just an idle
thought.

And, I think I see where you're going with the index idea, but since it
wasn't obvious until the second time through: the index could take up
to ten bits, replacing the address class, and thereby eliminating the
ops pointer.  That's where the 32 bits comes from, not from eliminating
aclass.  This costs a table lookup every time you want to get at the
aclass or ops, but that's probably OK.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-11-08 21:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-08 20:36 Andrew Cagney
2003-11-08 21:31 ` Daniel Jacobowitz [this message]
2003-11-09 13:54   ` Andrew Cagney
2003-11-17 18:28 ` Andrew Cagney
2004-01-23 15:49   ` Elena Zannoni
2004-01-26 20:35     ` Andrew Cagney

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=20031108213118.GA29731@nevyn.them.org \
    --to=drow@mvista.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