Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] [gdb] Exclude unavailable hardware threads in default worker-threads
Date: Thu, 17 Sep 2026 14:43:07 +0200	[thread overview]
Message-ID: <aa7d1790-4ede-4cae-8d85-19d81e25cf2a@suse.de> (raw)
In-Reply-To: <87h5jo680u.fsf@tromey.com>

On 9/17/26 2:22 AM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Sorry I didn't reply to this earlier.  I saw it went in.
> 
> Tom> +#ifdef __linux__
> Tom> +#include <sched.h>
> Tom> +#endif
>   
> The autoconf wisdom is to do feature checks, not platform checks, a
> style that's generally used in gdb.  And you can see the result here,
> where the above turned into
> 
> +#if defined (__linux__) || defined (__CYGWIN__)
> 
> Tom> +	  /* Exclude unavailable hardware threads (for instance made
> Tom> +	     unavailable using taskset).  */
> Tom> +#ifdef __linux__
> Tom> +	  cpu_set_t cpus;
> Tom> +	  int res = sched_getaffinity (getpid (), sizeof (cpu_set_t), &cpus);
> 
> Likewise for functions.
> 
> Tom> +#else
> Tom> +	  /* Todo: handle other platforms.  */
> Tom> +#endif
> 
> gdb generally has stopped adding todo/FIXME/etc comments, mainly because
> nobody ever actually does them.  Sometimes there are exceptions for
> specific plans, I'm guilty of this myself with the Python safety code.
> But here I think leaving this out would be completely fine, it's
> implicit that ports to new hosts may be desirable.
> 

Hi Tom,

thanks for the review.

I've submitted a fix ( 
https://sourceware.org/pipermail/gdb-patches/2026-September/230427.html ).

Thanks,
- Tom

> thanks,
> Tom


  reply	other threads:[~2026-09-17 12:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 15:48 [PATCH 1/2] [gdb/testsuite] Fix timeout in do_self_tests Tom de Vries
2026-09-06 15:48 ` [PATCH 2/2] [gdb] Exclude unavailable hardware threads in default worker-threads Tom de Vries
2026-09-07  4:44   ` Thiago Jung Bauermann
2026-09-07  6:52     ` Tom de Vries
2026-09-09 12:02     ` Tom de Vries
2026-09-16 17:27       ` Tom de Vries
2026-09-17  0:22   ` Tom Tromey
2026-09-17 12:43     ` Tom de Vries [this message]
2026-09-17 21:59     ` Tom Tromey
2026-09-18  7:07       ` Tom de Vries
2026-09-07  4:36 ` [PATCH 1/2] [gdb/testsuite] Fix timeout in do_self_tests Thiago Jung Bauermann
2026-09-09 11:57   ` Tom de Vries
2026-09-09 20:28     ` Thiago Jung Bauermann

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=aa7d1790-4ede-4cae-8d85-19d81e25cf2a@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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