Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Support DW_OP_call2 and DW_OP_call4 (PR 10640)
Date: Mon, 12 Oct 2009 20:43:00 -0000	[thread overview]
Message-ID: <m3aazwqr6v.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20090920123647.GA30021@host0.dyn.jankratochvil.net> (Jan 	Kratochvil's message of "Sun, 20 Sep 2009 14:36:47 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> as GCC discusses its use in PR41343 the patch implements it for GDB.

Thanks.

Jan> It has some new overhead due to symbol_hash for all symbol DIEs.
Jan> Did not measure it but I am not aware much how it could be avoided
Jan> as GDB does not parse the DWARF blocks while reading them in.

Yeah, I could not think of a way to avoid it either.  I think parsing
the DWARF while reading would be worse than what you have now, because
(IIUC) it would negatively impact performance.

I thought of one way to reduce the overhead a bit, but it is fairly
gross.  We could have dwarf2read.c make symbols like:

struct dwarf_symbol
{
  struct symbol base;
  int offset;
};

Then, where it matters, "downcast" from symbol to dwarf_symbol and find
the offset.  symbol_hash would just directly hold dwarf_symbols, no need
for struct dwarf2_offset_and_symbol.

This would save a pointer per symbol.

That said, I probably would not bother with this until we know that
space is an issue.  I know that symtab.h claims that symbol size is a
problem, but I am not sure that this is really true -- I suspect it is
only the case with -readnow, which most people don't use.

The ugliness here is that it assumes that no other part of gdb cares
about the size of a symbol.  This is probably true but also a fragile
assumption.

Jan> 2009-09-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
Jan> 	Fix PR 10640.
[...]

Ok.

Tom


  reply	other threads:[~2009-10-12 20:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-20 12:37 Jan Kratochvil
2009-10-12 20:43 ` Tom Tromey [this message]
2009-10-12 20:49   ` Tom Tromey
2010-06-07 11:56     ` [patch 0/2] DW_OP_call: " Jan Kratochvil
2010-06-07 11:56     ` [patch 2/2] DW_OP_call: Support DW_OP_call2 and DW_OP_call4 Jan Kratochvil
2010-06-07 18:13       ` Tom Tromey
2010-06-07 20:00         ` Jan Kratochvil
2010-06-07 11:56     ` [patch 1/2] DW_OP_call: Provide per_cu in the batons Jan Kratochvil
2010-06-07 17:44       ` Tom Tromey
2010-06-07 19:44         ` Jan Kratochvil
2009-10-12 21:08   ` [patch] Support DW_OP_call2 and DW_OP_call4 (PR 10640) Daniel Jacobowitz

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=m3aazwqr6v.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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