Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: The future of dwarf2_physname
Date: Thu, 19 May 2011 21:00:00 -0000	[thread overview]
Message-ID: <20110519205943.GA7479@caradoc.them.org> (raw)
In-Reply-To: <4DD44983.7060406@redhat.com>

On Wed, May 18, 2011 at 03:34:43PM -0700, Keith Seitz wrote:
> In short, if gdb uses DW_AT[_MIPS]_linkage_name when available, we
> can bypass constructing the physname *and* canonicalization, so gdb
> would only have to do this when DW_AT[_MIPS]_linkage_name is missing.
> Today this only happens AFAIK with gcc and ctors. I don't know about
> other compilers.

For all intents and purposes, no other current compiler emits
DW_AT_MIPS_linkage_name.

> This could be a sizable performance win (not yet tested or
> quantified). While it does introduce some regressions, many are
> compiler problems and some are template problems (the linkage name
> contains the return type, and 1) gdb isn't equipped to deal with
> that; 2) it makes for a horrible user experience having to specify it
> all the time). There might be others, I have only delved into this a
> bit myself today.
> 
> So the first question to be asked here is, Should we adopt Jan's
> patch, or some variation of it, to use DW_AT_linkage_name when
> available?

I've spent a lot of time on this question.  It's similar to the
approach I took in my previous implementation, but I was never happy
with it.  You get bizarre differences in behavior between compilers
(although the same thing does admittedly happen just based on the
DWARF output).

GCC ideally ought to get away from outputting linkage names; it's a
big space cost in the debug information.  That offers a potential
tie-breaker between the two strategies; keep using the linkage names
for old versions of GCC, and transition away as GCC improves.

In general, the sort of cross-check Jan has implemented could never
reliably pass without extensions to DWARF.  Once you get up into
templates, especially, there are template arguments that are hard
or impossible to represent in template parameter DIEs.

-- 
Daniel Jacobowitz


  parent reply	other threads:[~2011-05-19 21:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 22:35 Keith Seitz
2011-05-19 19:23 ` Jan Kratochvil
2011-05-20 19:53   ` Keith Seitz
2011-05-20 20:38     ` Jan Kratochvil
2011-05-20 20:39     ` Tom Tromey
2011-05-21 20:37       ` Daniel Jacobowitz
2011-05-19 21:00 ` Daniel Jacobowitz [this message]
2011-05-20 19:26   ` Tom Tromey
2011-05-21 20:34     ` Daniel Jacobowitz
2011-05-20 19:10 ` Tom Tromey
2011-05-23 13:17 ` Jan Kratochvil
2011-05-23 19:52   ` Tom Tromey
2011-05-23 19:57     ` Keith Seitz
2011-05-24 21:12   ` [rfc 1/2] libiberty/ options code reshuffle [Re: The future of dwarf2_physname] Jan Kratochvil
2011-06-02 15:36     ` obsolete: " Jan Kratochvil
2011-05-24 21:21   ` [rfc 2/2] Follow DW_AT_linkage_name for methods " Jan Kratochvil
2011-05-25 19:40     ` Keith Seitz
2011-05-25 20:42       ` Tom Tromey
2011-05-25 20:40     ` Tom Tromey
2011-06-01 18:35       ` Keith Seitz
2011-06-02 16:26         ` Jan Kratochvil
2011-06-02 18:20           ` Tom Tromey
2011-06-02 18:28             ` Jan Kratochvil
2011-06-02 19:03     ` obsolete: " Jan Kratochvil

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=20110519205943.GA7479@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@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