• R/O
  • HTTP
  • SSH
  • HTTPS

Listed des commits

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/cbiesinger/all-perf-patches
RSS
Révision l'heure Auteur
12f4dc4 users/cbiesinger/all-perf-patches 2019-11-19 08:51:10 Christian Biesinger

[RFC] Don't block on finishing demangling msymbols

Instead, do it all on a background thread and only block when we actually
need the result.

Note, this is a speedup but not quite as much as I was expecting; still
looking into what causes the waits. However, let me know if you have thoughts
on the concept!

Change-Id: I9d871917459ece0b41d31670b3c56600757aea66

6f509f2 2019-11-19 08:51:10 Christian Biesinger

Create a correctly-sized demangled names hashtable

If we have a minsym count, we know the demangled names hashtable will
be at least that big. So use that count to create it, so we don't
have to resize/rehash it as much.

This is a 6% improvement in minsym loading time.

2019-11-18 Christian Biesinger <cbiesinger@google.com>

* symtab.c (create_demangled_names_hash): Use per_bfd->
minimal_symbol_count as the initial size, if greater than
our default size.

Change-Id: I1f074d38e1d90af58705ec852f90c84cc034cd2e

f445b98 2019-11-11 03:30:24 Christian Biesinger

Compute msymbol hash codes in parallel

This is for the msymbol_hash and msymbol_demangled_hash hashtables
in objfile_per_bfd_storage. This basically computes those hash
codes together with the demangled symbol name in the background,
before it inserts the symbols in the hash table.

gdb/ChangeLog:

2019-09-30 Christian Biesinger <cbiesinger@google.com>

* minsyms.c (add_minsym_to_hash_table): Use a previously computed
hash code if possible.
(add_minsym_to_demangled_hash_table): Likewise.
(minimal_symbol_reader::install): Compute the hash codes for msymbol
on the background thread.
* symtab.h (struct minimal_symbol) <hash_value, demangled_hash_value>:
Add these fields.

Change-Id: Ifaa3346e9998f05743bff9e2eaad3f83b954d071

65ffb7c 2019-11-11 03:30:24 Christian Biesinger

Precompute hash value for symbol_set_names

We can also compute the hash for the mangled name on a background
thread so make this function even faster (about a 7% speedup).

gdb/ChangeLog:

2019-10-03 Christian Biesinger <cbiesinger@google.com>

* minsyms.c (minimal_symbol_reader::install): Also compute the hash
of the mangled name on the background thread.
* symtab.c (symbol_set_names): Allow passing in the hash of the
linkage_name.
* symtab.h (symbol_set_names): Likewise.

Change-Id: I044449e7eb60cffc1c43efd3412f2b485bd9faac

4a7dabe 2019-11-11 02:44:50 Tom Tromey

Set names of worker threads

This adds some configury so that gdb can set the names of worker
threads. This makes them show up more nicely when debugging gdb
itself.

2019-10-19 Tom Tromey <tom@tromey.com>

* gdbsupport/thread-pool.c (thread_pool::set_thread_count): Set
name of worker thread.
* gdbsupport/common.m4 (GDB_AC_COMMON): Check for
pthread_setname_np.
* configure, config.in: Rebuild.

gdb/gdbserver/ChangeLog
2019-10-19 Tom Tromey <tom@tromey.com>

* configure, config.in: Rebuild.

Change-Id: I60473d65ae9ae14d8c56ddde39684240c16aaf35


e4efbf3 2019-11-11 02:44:50 Tom Tromey

Use run_on_main_thread in gdb.post_event

This changes gdb.post_event to use the new run_on_main_thread
function. This is somewhat tricky because the Python GIL must be held
while manipulating reference counts.

2019-10-19 Tom Tromey <tom@tromey.com>

* python/python.c (class gdbpy_gil): New.
(struct gdbpy_event): Add constructor, destructor, operator().
(gdbpy_post_event): Use run_on_main_thread.
(gdbpy_initialize_events): Remove.
(do_start_initialization): Update.

Change-Id: Ie4431e60f328dae48bd96b6c6a8e875e70bda1de


9ca863a 2019-11-11 02:44:50 Tom Tromey

Add maint set/show worker-threads

This adds maint commands to control the number of worker threads that
gdb can use.

2019-10-19 Tom Tromey <tom@tromey.com>

* NEWS: Add entry.
* maint.c (_initialize_maint_cmds): Add "worker-threads" maint
commands. Call update_thread_pool_size.
(update_thread_pool_size, maintenance_set_worker_threads): New
functions.
(n_worker_threads): New global.

gdb/doc/ChangeLog
2019-10-19 Tom Tromey <tom@tromey.com>

* gdb.texinfo (Maintenance Commands): Document new maint
commands.

Change-Id: I4fb514faa05879d8afe62c77036a4469d57dca2a


15ae80b 2019-11-11 02:44:50 Tom Tromey

Demangle minsyms in parallel

This patch introduces a simple parallel for_each and changes the
minimal symbol reader to use it when computing the demangled name for
a minimal symbol. This yields a speedup when reading minimal symbols.

2019-10-19 Christian Biesinger <cbiesinger@google.com>
Tom Tromey <tom@tromey.com>

* minsyms.c (minimal_symbol_reader::install): Use
parallel_for_each.
* gdbsupport/parallel-for.h: New file.
* Makefile.in (HFILES_NO_SRCDIR): Add gdbsupport/parallel-for.h.

Change-Id: I220341f70e94dd02df5dd424272c50a5afb64978

b0ca8b4 2019-11-11 02:44:49 Christian Biesinger

Implement a thread pool

This adds a simple thread pool to gdb. In the end, this seemed
preferable to the approach taken in an earlier version of this series;
namely, starting threads in the parallel-foreach implementation. This
approach reduces the overhead of starting new threads, and also lets
the user control (in a subsequent patch) exactly how many worker
threads are running.

2019-10-19 Christian Biesinger <cbiesinger@google.com>
Tom Tromey <tom@tromey.com>

* gdbsupport/thread-pool.h: New file.
* gdbsupport/thread-pool.c: New file.
* Makefile.in (COMMON_SFILES): Add thread-pool.c.
(HFILES_NO_SRCDIR): Add thread-pool.h.

Change-Id: I597bb642780cb9d578ca92373d2a638efb44fe52


af2deea 2019-11-11 02:44:49 Tom Tromey

Introduce thread-safe way to handle SIGSEGV

The gdb demangler installs a SIGSEGV handler in order to protect gdb
from demangler bugs. However, this is not thread-safe, as signal
handlers are global to the process.

This patch changes gdb to always install a global SIGSEGV handler, and
then lets threads indicate their interest in handling the signal by
setting a thread-local variable.

This patch then arranges for the demangler code to use this; being
sure to arrange for calls to warning and the like to be done on the
main thread.

One thing I wondered while writing this patch is if there are any
systems that do not have "sigaction". If gdb could assume this, it
would simplify this code.

2019-10-19 Tom Tromey <tom@tromey.com>

* event-top.h (thread_local_segv_handler): Declare.
* event-top.c (thread_local_segv_handler): New global.
(install_handle_sigsegv, handle_sigsegv): New functions.
(async_init_signals): Install SIGSEGV handler.
* cp-support.c (gdb_demangle_jmp_buf): Change type. Now
thread-local.
(report_failed_demangle): New function.
(gdb_demangle): Make core_dump_allowed atomic. Remove signal
handler-setting code, instead use segv_handler. Run warning code
on main thread.

Change-Id: Ic832bbb033b64744e4b44f14b41db7e4168ce427


fe29e1f 2019-11-11 02:44:49 Tom Tromey

Introduce run_on_main_thread

This introduces a way for a callback to be run on the main thread.

2019-10-19 Tom Tromey <tom@tromey.com>

* unittests/main-thread-selftests.c: New file.
* Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
main-thread-selftests.c.
* ser-event.h (run_on_main_thread): Declare.
* ser-event.c (runnable_event, runnables, runnable_mutex): New
globals.
(run_events, run_on_main_thread, _initialize_ser_event): New
functions.

Change-Id: I16ef82f0564e9f8a524bdc64cb31df79a988ad9f


d14a705 2019-11-11 02:44:49 Tom Tromey

Introduce alternate_signal_stack RAII class

This introduces a new RAII class that temporarily installs an
alternate signal stack (on systems that have sigaltstack); then
changes the one gdb use of sigaltstack to use this class instead.

This will be used in a later patch, when creating new threads that may
want to handle SIGSEGV.

2019-10-19 Tom Tromey <tom@tromey.com>

* main.c (setup_alternate_signal_stack): Remove.
(captured_main_1): Use gdb::alternate_signal_stack.
* gdbsupport/alt-stack.h: New file.

Change-Id: I721c047ae9d51a35fd274a6dbc00a58c6440dae6


530c45d 2019-11-11 02:44:49 Tom Tromey

Add RAII class for blocking gdb signals

This adds configury support and an RAII class that can be used to
temporarily block signals that are used by gdb. (This class is not
used in this patch, but it split out for easier review.)

The idea of this patch is that these signals should only be delivered
to the main thread. So, when creating a background thread, they are
temporarily blocked; the blocked state is inherited by the new thread.

The sigprocmask man page says:

The use of sigprocmask() is unspecified in a multithreaded
process; see pthread_sigmask(3).

This patch changes gdb to use pthread_sigmask when appropriate, by
introducing a convenience define.

I've updated gdbserver as well, because I had to touch gdbsupport, and
because the threading patches will make it link against the thread
library.

I chose not to touch the NTO code, because I don't know anything about
that platform and because I cannot test it.

Finally, this modifies an existing spot in the Guile layer to use the
new facility.

2019-10-19 Tom Tromey <tom@tromey.com>

* gdbsupport/signals-state-save-restore.c (original_signal_mask):
Remove comment.
(save_original_signals_state, restore_original_signals_state): Use
gdb_sigmask.
* linux-nat.c (block_child_signals, restore_child_signals_mask)
(_initialize_linux_nat): Use gdb_sigmask.
* guile/guile.c (_initialize_guile): Use block_signals.
* Makefile.in (HFILES_NO_SRCDIR): Add gdb-sigmask.h.
* gdbsupport/gdb-sigmask.h: New file.
* event-top.c (async_sigtstp_handler): Use gdb_sigmask.
* cp-support.c (gdb_demangle): Use gdb_sigmask.
* gdbsupport/common.m4 (GDB_AC_COMMON): Check for
pthread_sigmask.
* configure, config.in: Rebuild.
* gdbsupport/block-signals.h: New file.

gdb/gdbserver/ChangeLog
2019-10-19 Tom Tromey <tom@tromey.com>

* remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
* linux-low.c (linux_wait_for_event_filtered, linux_async): Use
gdb_sigmask.
* configure, config.in: Rebuild.

Change-Id: If3f37dc57dd859c226e9e4d79458a0514746e8c6


a7231e9 2019-11-11 02:44:49 Tom Tromey

Add configure check for std::thread

This adds a configure check for std::thread. This is needed because
std::thread is not available on some systems, like some versions of
mingw and DJGPP.

This also adds configury to make sure that a threaded gdb links
against the correct threading library (-lpthread or the like), and
passes the right flags (e.g., -pthread) to the compilations.

Note that this also links gdbserver against the thread library. This
is not strictly necessary at this point in the series, but a later
patch will change gdbsupport to use pthread_sigmask, at which point
this will be needed.

2019-10-19 Tom Tromey <tom@tromey.com>

* acinclude.m4: Include ax_pthread.m4.
* Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
(INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
(CLIBS): Use PTHREAD_LIBS.
(aclocal_m4_deps): Add ax_pthread.m4.
* config.in, configure: Rebuild.
* gdbsupport/common.m4 (GDB_AC_COMMON): Check for std::thread.

gdb/gdbserver/ChangeLog
2019-10-19 Tom Tromey <tom@tromey.com>

* Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
(INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
(GDBSERVER_LIBS): Use PTHREAD_LIBS.
* acinclude.m4: Include ax_pthread.m4.
* config.in, configure: Rebuild.

Change-Id: I00ec55db6077f2615421a93461fc3be57e916aa0


bb749d8 2019-11-11 02:44:49 Tom Tromey

Defer minimal symbol name-setting

Currently the demangled name of a minimal symbol is set when creating
the symbol. However, there is no intrinsic need to do this. This
patch instead arranges for the demangling to be done just before the
minsym hash tables are filled. This will be useful in a later patch.

gdb/ChangeLog
2019-10-19 Tom Tromey <tom@tromey.com>

* symtab.h (struct minimal_symbol) <name_set>: New member.
* minsyms.c (minimal_symbol_reader::record_full): Copy name.
Don't call symbol_set_names.
(minimal_symbol_reader::install): Call symbol_set_names.

Change-Id: I4fe3993b99fb3a43968067806e294d48e377fd76

0b02626 2019-11-11 02:33:07 Tom Tromey

Remove can_highlight from TUI windows

Each TUI window has a "can_highlight" member. However, this has the
same meaning as "can_box" -- a window can be highlighted if and only
if it can be boxed. So, this patch removes can_highlight in favor of
simply using can_box.

gdb/ChangeLog
2019-11-10 Tom Tromey <tom@tromey.com>

* tui/tui-wingeneral.c (tui_unhighlight_win): Use can_box.
(tui_highlight_win): Likewise.
(tui_win_info::check_and_display_highlight_if_needed): Likewise.
* tui/tui-data.h (struct tui_win_info) <can_highlight>: Remove.
* tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
Don't set can_highlight.

Change-Id: I35916859070efcdfcc6e692c71cc6070956dcfce

b049ce2 2019-11-11 01:48:42 Tom Tromey

Remove unused constructor declaration from cli_style_option

I noticed that cli_style_option declares a constructor that is never
defined. This removes it.

gdb/ChangeLog
2019-11-10 Tom Tromey <tom@tromey.com>

* cli/cli-style.h (class cli_style_option) <cli_style_option>:
Remove unused declaration.

Change-Id: Ic59ec7eab4d7183d9392b58709354b2d4449b7be

0a5e0a4 2019-11-10 09:01:10 GDB Administrator

Automatic date update in version.in

f309f1d 2019-11-09 09:00:20 GDB Administrator

Automatic date update in version.in

dc2be32 2019-11-09 02:31:17 H.J. Lu

i386: Only check suffix in instruction mnemonic

We should check suffix in instruction mnemonic when matching instruction.
In Intel syntax, normally we check for memory operand size. But the same
mnemonic with 2 different encodings can have the same memory operand
size and i.suffix is set to LONG_DOUBLE_MNEM_SUFFIX from memory operand
size in Intel syntax to distinguish them. When there is no suffix in
mnemonic, we check LONG_DOUBLE_MNEM_SUFFIX in i.suffix for mnemonic
suffix.

gas/

PR gas/25167
* config/tc-i386.c (match_template): Don't check instruction
suffix set from operand.
* testsuite/gas/i386/code16.d: New file.
* testsuite/gas/i386/code16.s: Likewise.
* testsuite/gas/i386/i386.exp: Run code16.
* testsuite/gas/i386/x86-64-branch-4.l: Updated.

opcodes/

PR gas/25167
* i386-opc.tbl: Remove IgnoreSize from cmpsd and movsd.
* i386-tbl.h: Regenerated.

992a704 2019-11-08 22:59:36 Tom Tromey

Constify command_line_input

This changes command_line_input to return a "const char *", which is
appropriate because the memory is owned by command_line_input. Then
it fixes up the users.

I looked at making command_line_input transfer ownership to its caller
instead, but this is complicated due to the way read_next_line is
called, so I decided against it.

Tested by rebuilding.

gdb/ChangeLog
2019-11-08 Tom Tromey <tromey@adacore.com>

* top.c (read_command_file): Update.
(command_line_input): Make return type const.
* python/py-gdb-readline.c: Update.
* linespec.c (decode_line_2): Update.
* defs.h (command_line_input): Make return type const.
* cli/cli-script.c (read_next_line): Make return type const.
* ada-lang.c (get_selections): Update.

Change-Id: I27e6c9477fd1005ab5b16e0d337e4c015b6e6248

8a46e44 2019-11-08 19:37:43 Alan Modra

Revert "GENERATE_SHLIB_SCRIPT vs. EMBEDDED."

This reverts commit f2aaebdb97977ee7a5c83c02af871e758e7d594b.
My reasons for making that change were just plain wrong.

f74a630 2019-11-08 17:06:24 Jan Beulich

x86: convert RegMask and RegBND from bitfield to enumerator

This is to further shrink the operand type representation.

3528c36 2019-11-08 17:05:36 Jan Beulich

x86: convert RegSIMD and RegMMX from bitfield to enumerator

This is to further shrink the operand type representation.

4a5c67e 2019-11-08 17:04:53 Jan Beulich

x86: convert Control/Debug/Test from bitfield to enumerator

This is to further shrink the operand type representation.

00cee14 2019-11-08 17:04:09 Jan Beulich

x86: convert SReg from bitfield to enumerator

This is to further shrink the operand type representation.

bab6aec 2019-11-08 17:03:23 Jan Beulich

x86: introduce operand type "class"

Many operand types, in particular the various kinds of registers, can't
be combined with one another (neither in templates nor in register
entries), and hence it is not a good use of resources (memory as well as
execution time) to represent them as individual bits of a bit field.

831bd6a 2019-11-08 13:16:26 Alan Modra

PR25172, Wrong description of --stop-address=ADDR switch

PR 25172
* objdump.c (usage): Correct --stop-address description.

4bdc3b1 2019-11-08 09:00:14 GDB Administrator

Automatic date update in version.in

1f4cd31 2019-11-08 02:23:53 Matthew Malcomson

[gas][aarch64] Add the v8.6 Data Gathering Hint mnemonic [10/X]

Hi,

This patch is part of a series that adds support for Armv8.6-A
to binutils.

In this last patch, the new Data Gathering Hint mnemonic is introduced.

Committed on behalf of Mihail Ionescu.

gas/ChangeLog:

2019-11-07 Mihail Ionescu <mihail.ionescu@arm.com>

* testsuite/gas/aarch64/dgh.s: New test.
* testsuite/gas/aarch64/dgh.d: New test.

opcodes/ChangeLog:

2019-11-07 Mihail Ionescu <mihail.ionescu@arm.com>

* opcodes/aarch64-tbl.h (V8_6_INSN): New macro for v8.6 instructions.
(aarch64_opcode_table): Add data gathering hint mnemonic.
* opcodes/aarch64-dis-2.c: Account for new instruction.

Is it ok for trunk?

Regards,
Mihail