From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Slightly tweak and clarify target_resume's interface
Date: Fri, 29 Apr 2022 12:32:39 +0100 [thread overview]
Message-ID: <7ca08381-f37a-86f1-1179-93843b2ee4af@palves.net> (raw)
In-Reply-To: <7ebcb9b8-bebd-5813-5229-26b354ba06c0@simark.ca>
On 2022-04-28 21:38, Simon Marchi wrote:
>> I also thought of making iterate_over_lwps itself not iterate if the
>> ptid is an lwp, but this seems like the only spot where that would make
>> a difference so I didn't bother. Plus, we'd call the callback only
>> to have it do nothing (the second parameter is an "expect this lwp" parameter).
>
> What do you mean not iterate? We still want iterate_over_lwps to call
> the callback on that specific LWP, don't we? And since lwps are stored
> in a linked list, it has to iterate. I suppose it could break early
> once it has found the lwp though.
Yeah, I was thinking of something like done in
0618ae41497998792701b72f34ea4859cf95aafc ("gdb: optimize all_matching_threads_iterator").
To avoid iterating to find the lwp, we'd add a hash map like done for threads, with
inferior::ptid_thread_map.
>
>> Here's the updated patch. Retested on native and native-extended-gdbserver x86-64 GNU/Linux.
>>
>> WDYT?
>
> LGTM, thanks!
I'll check it in, then, thanks.
prev parent reply other threads:[~2022-04-29 11:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 15:49 [PATCH] Slighly " Pedro Alves
2022-04-21 16:22 ` Simon Marchi
2022-04-22 10:37 ` [PATCH v2] Slightly " Pedro Alves
2022-04-28 20:38 ` Simon Marchi
2022-04-29 11:32 ` 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=7ca08381-f37a-86f1-1179-93843b2ee4af@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).