Revert "Turn off threaded minsym demangling by default"
authorChristian Biesinger <cbiesinger@google.com>
Fri, 13 Dec 2019 22:35:05 +0000 (17:35 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Fri, 13 Dec 2019 22:44:52 +0000 (17:44 -0500)
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  <cbiesinger@google.com>

* 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
gdb/maint.h
gdb/minsyms.c

index f71cb80cec688dcb99598e5ed2fcb5c471a41a0d..51b803afab210834d22a0da1810f0694fccc0c3f 100644 (file)
@@ -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
index cbaf9deaa8832620d5ee49efdd2dd678d9fcec0e..827964d825324e1927f6544f956e7f62a0dd16b6 100644 (file)
@@ -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.  */
 
index 4f7260b3803fa0a89fc4b7bef6cec3885b2dcebe..40bedbd3e7fcec5de04637a7b4eda3c4ea82ce83 100644 (file)
@@ -54,7 +54,6 @@
 #include <algorithm>
 #include "safe-ctype.h"
 #include "gdbsupport/parallel-for.h"
-#include "maint.h"
 
 #if CXX_STD_THREAD
 #include <mutex>
@@ -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;
 
This page took 0.025756 seconds and 4 git commands to generate.