From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12616 invoked by alias); 23 Jan 2004 15:49:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12604 invoked from network); 23 Jan 2004 15:49:33 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 23 Jan 2004 15:49:33 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 7E1FC1A440D; Fri, 23 Jan 2004 10:47:13 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16401.16897.417048.555558@localhost.redhat.com> Date: Fri, 23 Jan 2004 15:49:00 -0000 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa:symtab] SYMBOL_LOCATION_FUNCS -> SYMBOL_OPS In-Reply-To: <3FB91365.8050809@redhat.com> References: <3FAD53AD.4030003@gnu.org> <3FB91365.8050809@redhat.com> X-SW-Source: 2004-01/txt/msg00626.txt.bz2 Andrew Cagney writes: > > 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". > > > > ok? > > Ping? I revised the comment thus: > > /* NOTE: cagney/2003-11-02: The fields "aclass" and "ops" contain > overlapping information. By creating a per-aclass ops vector, or > using the aclass as an index into an ops table, the aclass and > ops fields can be merged. The latter, for instance, would shave > 32-bits from each symbol (relative to a symbol lookup, any table > index overhead would be in the noise). */ > Ok. elena > Andrew > > 2003-11-08 Andrew Cagney > > * dwarf2loc.c (dwarf_expr_frame_base): Use SYMBOL_OPS instead of > SYMBOL_LOCATION_FUNCS > (dwarf2_loclist_funcs, dwarf2_locexpr_funcs): Change type to > "struct symbol_ops". > * dwarf2loc.h (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Change > type to "struct symbol_ops". > * dwarf2read.c (dwarf2_symbol_mark_computed): Set SYMBOL_OPS > intead of SYMBOL_LOCATION_FUNCS. > * ax-gdb.c (gen_var_ref): Ditto for "tracepoint_var_ref". > * printcmd.c (address_info): Ditto for "describe_location". > * findvar.c (symbol_read_needs_frame): Call "read_needs_frame" > when available. Assert requirement when LOC_COMPUTED or > LOC_COMPUTED_ARG. > (read_var_value): Ditto for "read_variable". > * symtab.h (struct symbol_ops): Rename "struct location_funcs". > (struct symbol): Replace ".aux_value.loc.funcs" and > ".aux_value.loc.baton" with ".ops" and ".aux_value.ptr". > (SYMBOL_OBJFILE): Delete macro. > (SYMBOL_LOCATION_FUNCS): Delete macro. > (SYMBOL_LOCATION_BATON): Update.