Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Shawn Landden <slandden@gmail.com>
Cc: gdb-patches@sourceware.org, jhb@freebsd.org,
	Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH] Fix slow and non-deterministic behavior of isspace() and tolower()
Date: Fri, 21 Jun 2019 21:14:00 -0000	[thread overview]
Message-ID: <3884097b-e834-e687-9916-7d4242960273@redhat.com> (raw)
In-Reply-To: <CA+49okop98cHaMn+VoOWkSNsu7479PU75wOHwNK9fZ74=3dVrA@mail.gmail.com>

On 6/21/19 9:30 PM, Shawn Landden wrote:
> On Fri, Jun 21, 2019 at 3:12 PM Pedro Alves <palves@redhat.com> wrote:
>> On 6/21/19 8:19 PM, Shawn Landden wrote:
>>> I was getting 8% and 6% cpu usage in tolower() and isspace(),
>>> respectively, waiting for a breakpoint on ppc64el.
>>>
>>> Also, gdb doesn't want non-deterministic behavior here.
>>>
>>> v2: do not touch C namespace
>>> v3: Turns out there are two places using these in performance-critical
>>> parts.
>>>     Follow GNU coding standards.
>> This doesn't address my comments about
>> <https://sourceware.org/ml/gdb-patches/2019-06/msg00442.html>.
>>
>> Something like this.  How does this compare?  Any significant
>> difference in your benchmark?  And again, how are you benchmarking
>> this?
> perf record. 

What was the use case?  Did you have some speficic set of commands?
Some script?  Please be detailed/more specific, so that
others can reproduce it, either now, or in the future when we
look back into this thread.

> goes from like 6-8% to almost nothing (if you remove the static).

What do you mean by "remove the static"?

Thanks,
Pedro Alves


      reply	other threads:[~2019-06-21 21:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09 15:17 Shawn Landden
2019-06-09 15:42 ` Eli Zaretskii
2019-06-09 15:51   ` Shawn Landden
2019-06-10 21:14 ` John Baldwin
2019-06-10 21:30 ` [PATCH v2] " Shawn Landden
2019-06-21 17:35   ` Pedro Alves
2019-06-21 17:59     ` Shawn Landden
2019-06-21 18:08       ` Pedro Alves
2019-06-21 19:20   ` [PATCH] " Shawn Landden
2019-06-21 20:12     ` Pedro Alves
2019-06-21 20:30       ` Shawn Landden
2019-06-21 21:14         ` Pedro Alves [this message]

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=3884097b-e834-e687-9916-7d4242960273@redhat.com \
    --to=palves@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@freebsd.org \
    --cc=slandden@gmail.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