From patchwork Fri Dec 13 22:45:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Biesinger X-Patchwork-Id: 36869 Received: (qmail 70530 invoked by alias); 13 Dec 2019 22:45:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 70325 invoked by uid 89); 13 Dec 2019 22:45:29 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-ua1-f42.google.com Received: from mail-ua1-f42.google.com (HELO mail-ua1-f42.google.com) (209.85.222.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2019 22:45:28 +0000 Received: by mail-ua1-f42.google.com with SMTP id v19so216396uap.0 for ; Fri, 13 Dec 2019 14:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P25hZmsO40jQG4Nmk2LY4Blqnh+cB+PnfBB/9XDfD+E=; b=e6KfDsxYH6Z64kT4o1aHV+5L309bfwydQuFchTsSrkiBXjnVMiDtMKvVaAX5cxBAe+ yW71dYV4c65V+mozsJ7/+6S0CFcwjeuN2B7dXrYEN1AvzMlt48CEABY5pWrYN2QkwaAb HtLCGvkmhhd6reUEmeplgEAWYWhW3LJPsneQU= Return-Path: Received: from cbiesinger.client.iberostar ([208.138.34.227]) by smtp.googlemail.com with ESMTPSA id y186sm5994768vkc.47.2019.12.13.14.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 14:45:25 -0800 (PST) From: cbiesinger@chromium.org To: gdb-patches@sourceware.org Cc: Christian Biesinger Subject: [FYI/PUSHED] Revert "Turn off threaded minsym demangling by default" Date: Fri, 13 Dec 2019 17:45:19 -0500 Message-Id: <20191213224519.113253-1-cbiesinger@chromium.org> MIME-Version: 1.0 From: Christian Biesinger This reverts commit 62e77f56f0ce8b10122881d8f0acd70e113fde93. (except for ChangeLog and a bugfix in minimal_symbol_reader::install) As agreed on the mailing list, now that GDB 9 has branched, this patch reverts the change to set worker-threads to zero. After this patch, multithreaded minsym demangling will be enabled again by default. gdb/ChangeLog: 2019-12-13 Christian Biesinger * maint.c (n_worker_threads): Default to -1. (worker_threads_disabled): Remove function. * maint.h (worker_threads_disabled): Remove function. * minsyms.c (minimal_symbol_reader::record_full): Don't call symbol_set_names here if worker_threads_disabled () is true. Change-Id: I5ff3e318d96f60968c8b8bedb84546ad2314d94b --- gdb/maint.c | 7 +------ gdb/maint.h | 2 -- gdb/minsyms.c | 10 ---------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/gdb/maint.c b/gdb/maint.c index f71cb80cec..51b803afab 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -845,12 +845,7 @@ maintenance_set_profile_cmd (const char *args, int from_tty, } #endif -static int n_worker_threads = 0; - -bool worker_threads_disabled () -{ - return n_worker_threads == 0; -} +static int n_worker_threads = -1; /* Update the thread pool for the desired number of threads. */ static void diff --git a/gdb/maint.h b/gdb/maint.h index cbaf9deaa8..827964d825 100644 --- a/gdb/maint.h +++ b/gdb/maint.h @@ -26,8 +26,6 @@ extern void set_per_command_time (int); extern void set_per_command_space (int); -extern bool worker_threads_disabled (); - /* Records a run time and space usage to be used as a base for reporting elapsed time or change in space. */ diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 4f7260b380..40bedbd3e7 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -54,7 +54,6 @@ #include #include "safe-ctype.h" #include "gdbsupport/parallel-for.h" -#include "maint.h" #if CXX_STD_THREAD #include @@ -1138,15 +1137,6 @@ minimal_symbol_reader::record_full (gdb::string_view name, else msymbol->name = name.data (); - if (worker_threads_disabled ()) - { - /* To keep our behavior as close as possible to the previous non-threaded - behavior for GDB 9.1, we call symbol_set_names here when threads - are disabled. */ - symbol_set_names (msymbol, msymbol->name, false, m_objfile->per_bfd); - msymbol->name_set = 1; - } - SET_MSYMBOL_VALUE_ADDRESS (msymbol, address); MSYMBOL_SECTION (msymbol) = section;