Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa:symtab] Delete broken "memory mapped objfile cache"
Date: Mon, 19 Jan 2004 16:51:00 -0000	[thread overview]
Message-ID: <16396.2731.710584.251473@localhost.redhat.com> (raw)
In-Reply-To: <3FA7D202.2050205@redhat.com>

Andrew Cagney writes:
 > Hello,
 > 
 > 	(more, somewhat perverse bcache fallout)
 > 
 > The "memory mapped objfile cache" (for want of a better name) is a 
 > technique where by GDB creates per-objfile disk backed memory mapped 
 > caches that contain the object files symbol information.  Its based on 
 > the theory that, after each rebuild little is changed, and hence most 
 > symbol information can be drawn from an on-disk cache, and re-read from 
 > the object file.  The lit, it turns out, supports the theory.  A typical 
 > debugging rebuild changes little in an executable.
 > 
 > So why delete it?  As far as I can tell:
 > 
 > - it hasn't worked in >4years
 > - it hasn't built in >1year
 > - it isn't tested
 > 
 > I've nothing personal against the the technique.  In fact I'd like to 
 > see a robust implementation backed by test cases and supporting 
 > performance data.  However, I strongly object to GDB having to carry 
 > around long-ago broken code.  By deleting this, we clear the decks for a 
 > modern robust implementation (the original code appears to date back to 
 > '92).
 > 
 > Rationale:
 > 
 > The original bcache was implemented using a per-object file obstack and 
 > a finite sized table.  Then in _1999_  the bcache was rewritten [fixed] 
 > so that it could use a growable hash table.  The hash table being 
 > allocated using xmalloc.
 > 
 > So?  The "mapped" code, as far as I can tell, relies on all the 
 > per-object file data being drawn from a per-object file memory-mapped 
 > memory pool.  The bcache fixes [unintentionally] broke that assumption. 
 >   The bcached data (in particular the partial symbol table) was moved to 
 > the global memory pool making the re-mapping of a per-object file 
 > structure anything but robust :-(.  Hence, I don't believe this has 
 > worked for >4years.
 > 
 > But wait, there's more ...
 > 
 > In _2003-07-12_ the bcache code was cleaned up, making the "struct 
 > bcache" opaque.  Life was good.
 > 
 > So?  Well, it turns out that the "mapped" code was grubbing around in 
 > bcache internals and the change [unintentionally] broke that ability 
 > leaving the "mapped" code unbuildable for >1year!
 > 
 > ok to commit?
 > Andrew
 > 
 > PS: Note that I'll also need to update the documentation
 > 2003-11-02  Andrew Cagney  <cagney@redhat.com>
 > 
 > 	* top.h (mapped_symbol_files): Delete declaration.
 > 	* main.c (captured_main): Delete option "m" and "mapped".
 > 	* objfiles.c (mapped_symbol_files): Delete variable.
 > 	* symfile.c (symbol_file_command): Delete mmap code.
 > 	(symbol_file_add_with_addrs_or_offsets): Ditto.
 > 	(add_symbol_file_command, reread_separate_symbols): Ditto.
 > 	* objfiles.h (OBJF_MAPPED): Delete.
 > 	* objfiles.c (allocate_objfile) [USE_MMALLOC]: Delete.
 > 	(free_objfile) [USE_MMALLOC]: Ditto.
 > 	(open_existing_mapped_file): Delete function.
 > 	(open_mapped_file): Delete function.
 > 	(map_to_file): Delete function.
 > 


I verified that it doesn't build (configure --with-mmalloc). Go ahead.

elena


  parent reply	other threads:[~2004-01-19 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-04 16:21 Andrew Cagney
2003-11-04 17:39 ` Daniel Berlin
2003-11-04 18:15   ` Andrew Cagney
2003-11-05  6:24 ` Eli Zaretskii
2003-11-17 18:36 ` Andrew Cagney
2003-11-17 18:39   ` Daniel Jacobowitz
2004-01-19 16:51 ` Elena Zannoni [this message]
2004-01-19 19:56   ` 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=16396.2731.710584.251473@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --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