This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH 2/2] btrace: avoid symbol lookup
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "Pedro Alves (palves at redhat dot com)" <palves at redhat dot com>
- Date: Mon, 24 Mar 2014 07:55:33 +0000
- Subject: RE: [PATCH 2/2] btrace: avoid symbol lookup
- Authentication-results: sourceware.org; auth=none
- References: <1394182665-14164-1-git-send-email-markus dot t dot metzger at intel dot com> <1394182665-14164-3-git-send-email-markus dot t dot metzger at intel dot com> <20140310214252 dot GA3105 at host2 dot jankratochvil dot net> <A78C989F6D9628469189715575E55B230AA8BFE3 at IRSMSX104 dot ger dot corp dot intel dot com> <20140321172215 dot GA15215 at host2 dot jankratochvil dot net>
> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Friday, March 21, 2014 6:22 PM
> To: Metzger, Markus T
> Cc: gdb-patches@sourceware.org; Pedro Alves (palves@redhat.com)
> Subject: Re: [PATCH 2/2] btrace: avoid symbol lookup
>
> On Tue, 11 Mar 2014 11:08:43 +0100, Metzger, Markus T wrote:
> > What's missing is a "fast fail", i.e. quickly determine that we won't find any
> > symbol for this PC. I won't be able to do this in a reasonable amount of
> time,
> > though, so I thought this patch is a compromise between functionality and
> > performance.
>
> I do not think providing incorrect behavior for performance reasons is a valid
> tradeoff. The right way would be to fix the DWARF lookups to be fast
> enough.
I realized after I sent this that the word 'functionality' was not chosen well.
The only actual change in functionality I was able to observe was missing
parens for the main function, i.e. it had been printed "main()" and is now
printed "main". That's because its language is 'auto' and not 'c' or 'cpp'.
I believe that this could and should be fixed by fixing up the language of
the main mini-symbol to align with the language of other symbols in the
same object file.
I think the compromise is rather between a nice, general solution that
benefits everybody and a local solution that only benefits btrace and that
might make supporting inline functions more difficult in the future.
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052