From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84982 invoked by alias); 26 Nov 2019 20:50:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 84974 invoked by uid 89); 26 Nov 2019 20:50:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1484 X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Nov 2019 20:50:57 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id BF50D204A7; Tue, 26 Nov 2019 15:50:54 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 76CBC202DF; Tue, 26 Nov 2019 15:50:52 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 555D120AF6; Tue, 26 Nov 2019 15:50:52 -0500 (EST) X-Gerrit-PatchSet: 4 Date: Tue, 26 Nov 2019 20:50:00 -0000 From: "Tom Tromey (Code Review)" To: gdb-patches@sourceware.org Cc: Pedro Alves , Christian Biesinger Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v4] Demangle minsyms in parallel X-Gerrit-Change-Id: I220341f70e94dd02df5dd424272c50a5afb64978 X-Gerrit-Change-Number: 173 X-Gerrit-ChangeURL: X-Gerrit-Commit: 8d2c69ea050b6f3bac49715e144d3661a66d21ab In-Reply-To: References: X-Gerrit-Comment-Date: Tue, 26 Nov 2019 15:50:51 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191126205052.555D120AF6@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-11/txt/msg00928.txt.bz2 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 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 Gerrit-Reviewer: Christian Biesinger Gerrit-Reviewer: Pedro Alves Gerrit-Reviewer: Tom Tromey Gerrit-Comment-Date: Tue, 26 Nov 2019 20:50:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment