Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Smith <psmith@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: [GDB 7.6/GCC 4.8.0] Slowdown in GDB macro processing for cores?
Date: Wed, 22 May 2013 18:50:00 -0000	[thread overview]
Message-ID: <1369248335.7209.151.camel@homebase> (raw)
In-Reply-To: <51960329.2010802@redhat.com>

On Fri, 2013-05-17 at 11:15 +0100, Pedro Alves wrote:
> > Against a core file it takes a second or longer per iteration of this
> > loop!  FWIW, the class this macro operates on is very large and contains
> > a lot of data per object.
> > 
> > Any ideas?  Is there a handy way to tell where the slowdown is happening
> > here?  
> 
> I'm really surprised.  If anything, I'd expect cores to be marginally faster.
> I suggest git bisecting gdb looking.  Maybe you'll find the culprit
> easily that way.

Sorry for the delay.  Getting a repro case was harder than it seemed
initially... just running "kill -9" on the process wasn't enough, or
didn't crash at the right spot, or something.  We had to induce a
failure through a particular assert().

However, now I have a core file and executable built with my local copy
of GDB 4.8.0.  If I run the macro using a locally-built copy of GDB
7.5.1, then I get this behavior:

  $ time gdb-7.5.1 -c core.30095 -x macros.gdb myprog \
      -ex "frame 4" -ex "ptracelog master->traceLog" -ex "q"
   ...prints 200 trace log lines...
  real    0m2.811s
  user    0m2.768s
  sys     0m0.028s

so that's good stuff.

Now I try it with GDB 7.6, compiled locally using the identical
configure/etc. commands, and I get this behavior:

  $ time gdb-7.6 -c core.30095 -x macros.gdb myprog \
      -ex "frame 4" -ex "ptracelog master->traceLog" -ex "q"
   ...prints 200 trace log lines...
  real    11m51.113s
  user    11m46.324s
  sys     0m2.168s

That's... not as good :-p.

I've just got this case working now, so I'll look into what's going on
here more.


  reply	other threads:[~2013-05-22 18:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 19:42 Paul Smith
2013-05-17 10:15 ` Pedro Alves
2013-05-22 18:50   ` Paul Smith [this message]
2013-05-22 19:20     ` Paul Smith
2013-05-22 20:12       ` Tom Tromey
2013-05-22 20:52         ` Paul Smith
2013-05-22 21:02         ` Paul Smith
2013-05-22 23:14         ` Paul Smith
2013-05-23  2:44           ` Doug Evans
2013-05-23  4:41             ` Paul Smith
2013-05-28 17:11               ` Doug Evans
2013-05-28 17:33                 ` Paul Smith
2013-05-28 17:40                   ` Doug Evans
2013-05-28 17:53                     ` Paul Smith
2013-05-28 18:03                       ` Doug Evans
2013-05-28 15:25           ` Paul Smith

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=1369248335.7209.151.camel@homebase \
    --to=psmith@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=palves@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