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

On Thu, Feb 05, 2004 at 03:34:30PM -0500, Elena Zannoni wrote:
>  > The obstacks themselves are probably a good idea.  Once upon a time,
>  > Peter informed me, there was a plan to free the psymbol obstack when
>  > all symbols had been read in; but that doesn't seem like a useful
>  > optimization, and I can't think offhand of any use for separate symbol
>  > and type obstacks.  I wouldn't object to having a per-objfile obstack
>  > instead, and un-seperating them.
> 
> I think it would be worthwhile to see how much doing that would save us.

Well, it wouldn't save anything by itself - there's immeasurable
overhead to the obstacks.  It would let us eliminate this sort of
duplication, but they're pretty tricky to identify; it took me a couple
of hours to convince myself about this set of 'em.

>  > > [BTW why are only few obstack properly initialized?]
>  > 
>  > Which do you mean?
>  > 
> 
> I grepped for obstack_init, and only a few obstacks call that
> function. Form the obstack doco, it seems that it needs to be
> called. I wonder if the function was introduced later on in libiberty,
> as an afterthought.

It looks like obstack_specify_allocation and obstack_init fill the same
role.  The objfile's obstacks use the former.

> Ah, ok, it's because of the nature of the program you were handling. I
> was trying to imagine how the overhead of obstack themselves could be
> that large. It seems to me that this is a good argument for an 'on
> demand' symbol reading implementaion.  But, yes the various dwarf2
> sections are already in the psymbol_obstack. And we are duplicating
> that again on the type_obstack. :-( 

Right.  I'm not sure how much of this can be done on demand that isn't
already; if I wasn't clear about this, the 100MB was a worst-case
number (-readnow).  Without -readnow it's much less.

>  > Another large portion comes from not duplicating the names of types in
>  > the typedef symbols associated with the type.  One was on type_obstack,
>  > the other on symbol_obstack.
>  > 
> 
> Right; this would also go away if we unify the obstacks.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2004-02-05 20:47 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
2004-02-05 19:48     ` Daniel Jacobowitz
2004-02-05 20:37       ` Elena Zannoni
2004-02-05 20:47         ` Daniel Jacobowitz [this message]
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=20040205204756.GA2465@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ezannoni@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