Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: Don't use obsavestring in dwarf2read
Date: Thu, 05 Feb 2004 19:29:00 -0000	[thread overview]
Message-ID: <16418.39156.566837.685666@localhost.redhat.com> (raw)
In-Reply-To: <20040202182218.GA3405@nevyn.them.org>

Daniel Jacobowitz writes:
 > On Sun, Jan 11, 2004 at 08:57:26PM -0500, Daniel Jacobowitz wrote:
 > > This patch is pretty self-explanatory, and pretty effective: With -readnow
 > > to force immediate loading of full symbols, this is good for 3% startup time
 > > and 30% memory savings (that's 100MB out of 330MB!) for a gdb session
 > > against "monotone".  We already rely on the lifetimes of this data, so
 > > there's no point in duplicating it onto another obstack with the exact same
 > > lifetime.
 > > 
 > > OK?
 > > 
 > > [My current C++ work may have significant memory and startup time impact. 
 > > I'm trying to clean house at the same time, so that I don't introduce a net
 > > loss.  This is low-hanging fruit; higher-hanging fruit will take somewhat
 > > longer.]
 > 
 > Updated for Michael's comments, and to fix merge issues (and a new
 > introduction of obsavestring).  I also updated the leading comment to
 > mention that symbols and types can now point into each other's
 > obstacks.


I am not comfortable with this micro-optimization.

The purpose and design of the objfile obstacks would become confusing.
TYPE_TAG_NAME, for instance, would be now allocated on the
type_obstack in all files except for dwarf2read.c. And the
crosspollination between different obstacks also is perplexing. I
don't think that assuming that they will always have the same lifetime
is safe, given they are intentionally separate.

However you do raise some good points. Do we need 3 separate obstacks for
each object file? If they all have the same lifetime, maybe not.
Also are the obstacks a good idea in general? 

[BTW why are only few obstack properly initialized?]

How do you get to 30% savings from these changes?



  reply	other threads:[~2004-02-05 19:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-12  1:57 Daniel Jacobowitz
2004-02-02 18:22 ` Daniel Jacobowitz
2004-02-05 19:29   ` Elena Zannoni [this message]
2004-02-05 19:48     ` Daniel Jacobowitz
2004-02-05 20:37       ` Elena Zannoni
2004-02-05 20:47         ` Daniel Jacobowitz
2004-02-05 23:20           ` Elena Zannoni
2004-02-08  4:41             ` Daniel Jacobowitz
2004-02-16 15:05               ` Elena Zannoni
2004-03-19  0:09                 ` Daniel Jacobowitz
2004-03-05  3:31                   ` Daniel Jacobowitz
2004-01-15 14:23 Michael Elizabeth Chastain
2004-02-02 21:48 Michael Elizabeth Chastain
2004-02-10 10:08 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=16418.39156.566837.685666@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=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