Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Doug Evans <dje@google.com>
Cc: tromey@redhat.com, gdb-patches@sourceware.org, ccoutant@google.com
Subject: Re: [RFA] comdat types
Date: Fri, 26 Jun 2009 01:33:00 -0000	[thread overview]
Message-ID: <20090626013330.GA20206@caradoc.them.org> (raw)
In-Reply-To: <e394668d0906251328v4559d3c9g48698aac014188fc@mail.gmail.com>

On Thu, Jun 25, 2009 at 01:28:02PM -0700, Doug Evans wrote:
> > Doug> +  types_htab = htab_create_alloc_ex (41,
> > Doug> +                              hash_type_signature,
> > Doug> +                              eq_type_signature,
> > Doug> +                              NULL,
> > Doug> +                              &objfile->objfile_obstack,
> > Doug> +                              hashtab_obstack_allocate,
> > Doug> +                              dummy_obstack_deallocate);
> >
> > This is just a side note -- I've seen a few hash tables allocated on
> > obstacks.  Doesn't resizing the table waste memory?
> 
> IIRC I use the noresize traversal routine.
> It's not ideal, no.

FWIW, 3 of the other 4 hash tables are on the compilation unit
obstack, which is temporary.  The exception is type_hash which I found
to be performance-sensitive (both time and space) and have a pretty
good initial size estimate.  Obstacks are a big win for that sort of
thing.

This one probably fills the same niche, but doesn't have an initial
estimate.  So I'm not sure what I think about keeping it on the
obstack.  If the contents can go on the obstack instead, that's
probably enough.

> > Doug> +  if (this_cu->from_debug_types)
> > Doug> +    {
> > Doug> +      /* ??? How come this is for .debug_types only?  */
> > Doug> +      this_cu->offset = cu.header.offset;
> > Doug> +      this_cu->length = cu.header.length + cu.header.initial_length_size;
> >
> > Daniel has asked before for "no new FIXMEs".  You can't escape this by
> > spelling it "???" :-)
> 
> Well, that one was an oversight (these patches drag on and my eyes
> tend to glaze over ...).
> While as a general rule I don't disagree, it's kinda odd to see others
> add new functionality with open issues.

Yes, we're (me included) not totally consistent on this - but it's a
sure way to get reviewers to chew on you, as you know :-)

As a general extension to the general rule, "FIXME: Foo doesn't work"
makes me happier than "FIXME: What about foo?".  I particularly don't
like FIXMEs with questions in them; we should know what works and
what doesn't.

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2009-06-26  1:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-20  0:04 Doug Evans
2009-06-25 19:47 ` Tom Tromey
2009-06-25 20:28   ` Doug Evans
2009-06-25 20:49     ` Tom Tromey
2009-07-15  1:13       ` Doug Evans
2009-07-15 19:28         ` Tom Tromey
2009-07-16  1:25           ` Doug Evans
2009-07-21  0:10           ` Cary Coutant
2009-06-26  1:33     ` Daniel Jacobowitz [this message]
2009-06-26  0:01   ` Cary Coutant
2009-06-26  0:54     ` Doug Evans

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=20090626013330.GA20206@caradoc.them.org \
    --to=drow@false.org \
    --cc=ccoutant@google.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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