From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Bernd Edlinger <bernd.edlinger@hotmail.de>,
Tom Tromey <tom@tromey.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCHv5] Fix range end handling of inlined subroutines
Date: Wed, 22 Apr 2020 15:03:49 -0600 [thread overview]
Message-ID: <87pnbzqll6.fsf@tromey.com> (raw)
In-Reply-To: <20200404220718.GA3917@embecosm.com> (Andrew Burgess's message of "Sat, 4 Apr 2020 23:07:18 +0100")
>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:
>> +void
>> +buildsym_compunit::record_inline_range_end (CORE_ADDR end)
>> +{
>> + /* The performance of this function is very important,
>> + it shall be O(n*log(n)) therefore we do not use std::vector
>> + here since some compilers, e.g. visual studio, do not
>> + guarantee that for vector::push_back. */
Andrew> I think we're going to need more of a group discussion on this.
Andrew> Simply saying std::vector is too slow doesn't I'm afraid convince me.
Andrew> There seem to be lots of other places in GDB where both performance is
Andrew> critical, and we use ::push_back.
Andrew> Is your claim that we should move away from std::vector in all these
Andrew> cases? Is this case somehow special?
C++ documents push_back as having amortized constant complexity. If
that's not the case for the MS compiler, that seems like a pretty
serious bug there... I guess I'd like some documentation of some kind (a
stackoverflow question, or maybe a test program that shows the vector
growing linearly, or something like that).
I didn't understand the relevance or target of the "n*log(n)" comment.
Andrew> I don't think we should be doing this. This is defined quite clearly
Andrew> in the DWARF spec as being an empty range. No code is associated with
Andrew> this range. As such, it really shouldn't have an impact on how we
Andrew> interpret the rest of the DWARF.
Andrew> Again, I think you're trying too hard to work around GCC's broken
Andrew> DWARF output.
Do we know how long GCC has been generating this?
And whether anybody is investigating a fix?
I dislike adding workarounds for relatively modern versions of
GCC... I'd prefer these things be fixed in GCC if possible. However, if
that's not possible, I'm also flexible about it.
Tom
next prev parent reply other threads:[~2020-04-22 21:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-04 19:50 Bernd Edlinger
2020-04-04 22:07 ` Andrew Burgess
2020-04-04 23:59 ` Bernd Edlinger
2020-04-22 21:03 ` Tom Tromey [this message]
2020-04-25 7:29 ` Bernd Edlinger
2020-04-04 22:27 ` Luis Machado
2020-04-04 22:30 ` Luis Machado
2020-04-05 0:05 ` Bernd Edlinger
2020-04-04 23:38 ` Bernd Edlinger
2020-04-05 2:28 ` [PATCHv6] " Bernd Edlinger
2020-04-05 15:26 ` Luis Machado
2020-04-05 16:00 ` Bernd Edlinger
2020-04-05 17:27 ` Bernd Edlinger
2020-04-06 17:35 ` Andrew Burgess
2020-04-06 19:34 ` Bernd Edlinger
2020-04-06 21:17 ` Bernd Edlinger
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=87pnbzqll6.fsf@tromey.com \
--to=tom@tromey.com \
--cc=andrew.burgess@embecosm.com \
--cc=bernd.edlinger@hotmail.de \
--cc=gdb-patches@sourceware.org \
/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