From: Pedro Alves <pedro@codesourcery.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Add optional argument to "info threads" command
Date: Mon, 24 Nov 2008 22:10:00 -0000 [thread overview]
Message-ID: <200811241924.14165.pedro@codesourcery.com> (raw)
In-Reply-To: <492AFAE8.4040405@vmware.com>
On Monday 24 November 2008 19:05:12, Michael Snyder wrote:
> Well, all your observations are correct -- but the same thing
> also happens if you merely switch the thread of focus using the
> "thread" command.
>
> I do think that prune-threads and target_find_new_threads
> are being called too aggressively from somewhere, but it
> isn't directly from info_threads_command.
It's inside print_thread_info, and IIUC, you're calling it
on each of the ids in range?
> I think this is a separate, pre-existing problem that this patch
> helps to reveal.
I'm thinking about the case where you have 200 threads, and you
do 'info threads 40-45'.
That'll do 15 prune_threads, target_find_new_threads and
frame restores. That'll be around '14 * (200 + 200 + 1)'
roundtrips extra at least instead of the current (200 + 200).
The worst case, is of course, if you do 'info threads 1-200'.
Then you'll have '199 * (200 + 200 + 1)' extra target
roundtrips compared to plain 'info threads'. That's around
80000? Unless I'm missing something.
Isn't this the same reasoning behind having thread_apply_command
and thread_apply_all implementations, instead of having one call
into the other?
(Upps, just spotted a cleanups bug in thread_apply_command).
--
Pedro Alves
next prev parent reply other threads:[~2008-11-24 19:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-24 12:44 Michael Snyder
2008-11-24 15:19 ` teawater
2008-11-24 16:33 ` Pedro Alves
2008-11-24 21:22 ` Michael Snyder
2008-11-24 22:10 ` Pedro Alves [this message]
2008-11-24 23:03 ` Pedro Alves
2008-11-25 8:48 ` Michael Snyder
2008-11-25 16:06 ` Pedro Alves
2008-11-24 23:22 ` Eli Zaretskii
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=200811241924.14165.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.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