Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Tom Tromey (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: gdb-patches@sourceware.org
Cc: Pedro Alves <palves@redhat.com>,
	Christian Biesinger <cbiesinger@google.com>
Subject: [review v4] Demangle minsyms in parallel
Date: Tue, 26 Nov 2019 20:50:00 -0000	[thread overview]
Message-ID: <20191126205052.555D120AF6@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1571543710000.I220341f70e94dd02df5dd424272c50a5afb64978@gnutoolchain-gerrit.osci.io>

Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/173
......................................................................


Patch Set 4:

(1 comment)

| --- /dev/null
| +++ gdb/gdbsupport/parallel-for.h
| @@ -1,0 +50,19 @@ #if CXX_STD_THREAD
| +  size_t n_actual_threads = 0;
| +  std::future<void> futures[local_max];
| +
| +  size_t n_elements = last - first;
| +  if (n_threads > 1)
| +    {
| +      /* Arbitrarily require that there should be at least 10 elements
| +	 in a thread.  */
| +      if (n_elements / n_threads < 10)
| +	n_threads = n_elements / 10;

PS4, Line 59:

This could yield zero, causing a SIGFPE.
I've fixed this now.

| +      size_t elts_per_thread = n_elements / n_threads;
| +      n_actual_threads = n_threads - 1;
| +      for (int i = 0; i < n_actual_threads; ++i)
| +	{
| +	  RandomIt end = first + elts_per_thread;
| +	  auto task = [=] ()
| +		      {
| +			callback (first, end);
| +		      };

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I220341f70e94dd02df5dd424272c50a5afb64978
Gerrit-Change-Number: 173
Gerrit-PatchSet: 4
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Tue, 26 Nov 2019 20:50:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


  parent reply	other threads:[~2019-11-26 20:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-20  3:55 [review] " Tom Tromey (Code Review)
2019-10-20 11:06 ` Christian Biesinger (Code Review)
2019-10-20 20:55 ` [review v2] " Tom Tromey (Code Review)
2019-10-30 23:00 ` [review v3] " Tom Tromey (Code Review)
2019-11-22 23:45 ` Tom Tromey (Code Review)
2019-11-22 23:56 ` [review v4] " Tom Tromey (Code Review)
2019-11-26 19:06 ` Pedro Alves (Code Review)
2019-11-26 19:11 ` Pedro Alves (Code Review)
2019-11-26 19:42 ` Tom Tromey (Code Review)
2019-11-26 20:50 ` Tom Tromey (Code Review) [this message]
2019-11-26 21:13 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-11-26 21:14 ` Sourceware to Gerrit sync (Code Review)

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=20191126205052.555D120AF6@gnutoolchain-gerrit.osci.io \
    --to=gerrit@gnutoolchain-gerrit.osci.io \
    --cc=cbiesinger@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gnutoolchain-gerrit@osci.io \
    --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