public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/12] Concurrent displaced stepping
@ 2020-11-10 21:46 Simon Marchi
  2020-11-10 21:46 ` [PATCH 01/12] gdb: add inferior_execd observable Simon Marchi
                   ` (11 more replies)
  0 siblings, 12 replies; 44+ messages in thread
From: Simon Marchi @ 2020-11-10 21:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

This patch series changes GDB to allow concurrent displaced steps to
occur simultanesously in a single inferior.  The goal is to reduce the
bottleneck in applications that need to do many displaced steps at the
same time.

Patches 09, 11 and 12 are the main ones implementing the feature.  The
other ones are mostly preparatory patches to reduce the diff and
complexity in the main ones.

At the end of the series, GDB uses two displaced stepping buffers when
debugging an AMD64/Linux program, so is able to execute two displaced
steps at a time.  There isn't a super significant performance
improvement as a result.  However, this work was done in the context of
ROCm GDB [1], where we have as many displaced step buffers as there are
threads.  In this context, it makes a huge difference.  So, the feature
isn't absolutely necessary on AMD64/Linux, but it is there at least to
have one reference implementation of an architecture in upstream using
multiple displaced step buffers, so that it's possible to test the
feature with common hardware.

This was regtested on x86-64 Ubuntu 20.04 using the unix,
native-gdbserver and native-extended-gdbserver boards.

[1] https://github.com/ROCm-Developer-Tools/ROCgdb

Simon Marchi (12):
  gdb: add inferior_execd observable
  gdb: clear inferior displaced stepping state on exec
  gdb: rename things related to step over chains
  gdb: rename displaced_step_closure to displaced_step_copy_insn_closure
  gdb: rename displaced_step_fixup to displaced_step_finish
  gdb: introduce status enum for displaced step prepare/finish
  gdb: pass inferior to get_linux_inferior_data
  gdb: move displaced stepping types to displaced-stepping.{h,c}
  gdb: move displaced stepping logic to gdbarch, allow starting
    concurrent displaced steps
  gdb: change linux gdbarch data from post to pre-init
  gdb: make displaced stepping implementation capable of managing
    multiple buffers
  gdb: use two displaced step buffers on amd64/Linux

 gdb/Makefile.in                               |   1 +
 gdb/aarch64-linux-tdep.c                      |   3 +-
 gdb/aarch64-tdep.c                            |  18 +-
 gdb/aarch64-tdep.h                            |   5 +-
 gdb/alpha-linux-tdep.c                        |   2 +-
 gdb/amd64-linux-tdep.c                        |  11 +-
 gdb/amd64-tdep.c                              |  23 +-
 gdb/amd64-tdep.h                              |   9 +-
 gdb/arc-linux-tdep.c                          |   2 +-
 gdb/arm-linux-tdep.c                          |  19 +-
 gdb/arm-tdep.c                                | 183 +++----
 gdb/arm-tdep.h                                |  18 +-
 gdb/bfin-linux-tdep.c                         |   2 +-
 gdb/cris-linux-tdep.c                         |   2 +-
 gdb/csky-linux-tdep.c                         |   2 +-
 gdb/displaced-stepping.c                      | 289 +++++++++++
 gdb/displaced-stepping.h                      | 200 ++++++++
 gdb/frv-linux-tdep.c                          |   2 +-
 gdb/gdbarch.c                                 | 117 ++++-
 gdb/gdbarch.h                                 |  47 +-
 gdb/gdbarch.sh                                |  26 +-
 gdb/gdbthread.h                               |  35 +-
 gdb/hppa-linux-tdep.c                         |   2 +-
 gdb/i386-linux-tdep.c                         |  31 +-
 gdb/i386-tdep.c                               |  14 +-
 gdb/i386-tdep.h                               |  12 +-
 gdb/ia64-linux-tdep.c                         |   2 +-
 gdb/inferior.h                                |   1 +
 gdb/infrun.c                                  | 449 ++++++++----------
 gdb/infrun.h                                  |  84 +---
 gdb/jit.c                                     |   9 +-
 gdb/jit.h                                     |   7 -
 gdb/linux-tdep.c                              | 114 ++++-
 gdb/linux-tdep.h                              |  27 +-
 gdb/m32r-linux-tdep.c                         |   2 +-
 gdb/m68k-linux-tdep.c                         |   2 +-
 gdb/microblaze-linux-tdep.c                   |   2 +-
 gdb/mips-linux-tdep.c                         |   2 +-
 gdb/mn10300-linux-tdep.c                      |   2 +-
 gdb/nios2-linux-tdep.c                        |   2 +-
 gdb/observable.c                              |   1 +
 gdb/observable.h                              |   3 +
 gdb/or1k-linux-tdep.c                         |   2 +-
 gdb/ppc-linux-tdep.c                          |   5 +-
 gdb/riscv-linux-tdep.c                        |   2 +-
 gdb/rs6000-aix-tdep.c                         |   6 +-
 gdb/rs6000-tdep.c                             |  94 +++-
 gdb/s390-linux-tdep.c                         |   2 +-
 gdb/s390-tdep.c                               |  22 +-
 gdb/sh-linux-tdep.c                           |   2 +-
 gdb/solib.c                                   |   4 +
 gdb/sparc-linux-tdep.c                        |   2 +-
 gdb/sparc64-linux-tdep.c                      |   2 +-
 .../gdb.arch/amd64-disp-step-avx.exp          |   2 +-
 .../forking-threads-plus-breakpoint.exp       |   2 +-
 .../gdb.threads/non-stop-fair-events.exp      |   2 +-
 gdb/thread.c                                  |  60 ++-
 gdb/tic6x-linux-tdep.c                        |   2 +-
 gdb/tilegx-linux-tdep.c                       |   2 +-
 gdb/xtensa-linux-tdep.c                       |   2 +-
 60 files changed, 1352 insertions(+), 647 deletions(-)
 create mode 100644 gdb/displaced-stepping.c
 create mode 100644 gdb/displaced-stepping.h

-- 
2.28.0


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2020-12-01  4:27 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 21:46 [PATCH 00/12] Concurrent displaced stepping Simon Marchi
2020-11-10 21:46 ` [PATCH 01/12] gdb: add inferior_execd observable Simon Marchi
2020-11-25  1:28   ` Pedro Alves
2020-11-10 21:46 ` [PATCH 02/12] gdb: clear inferior displaced stepping state on exec Simon Marchi
2020-11-25  1:28   ` Pedro Alves
2020-12-01  4:27     ` Simon Marchi
2020-11-10 21:46 ` [PATCH 03/12] gdb: rename things related to step over chains Simon Marchi
2020-11-25  1:28   ` Pedro Alves
2020-11-25 13:16     ` Simon Marchi
2020-11-10 21:46 ` [PATCH 04/12] gdb: rename displaced_step_closure to displaced_step_copy_insn_closure Simon Marchi
2020-11-25  1:29   ` Pedro Alves
2020-11-10 21:46 ` [PATCH 05/12] gdb: rename displaced_step_fixup to displaced_step_finish Simon Marchi
2020-11-25  1:29   ` Pedro Alves
2020-11-10 21:46 ` [PATCH 06/12] gdb: introduce status enum for displaced step prepare/finish Simon Marchi
2020-11-11 23:36   ` Andrew Burgess
2020-11-25 13:17     ` Simon Marchi
2020-11-25  1:30   ` Pedro Alves
2020-11-25 13:20     ` Simon Marchi
2020-11-10 21:46 ` [PATCH 07/12] gdb: pass inferior to get_linux_inferior_data Simon Marchi
2020-11-25  1:30   ` Pedro Alves
2020-11-10 21:46 ` [PATCH 08/12] gdb: move displaced stepping types to displaced-stepping.{h, c} Simon Marchi
2020-11-25  1:30   ` Pedro Alves
2020-11-10 21:46 ` [PATCH 09/12] gdb: move displaced stepping logic to gdbarch, allow starting concurrent displaced steps Simon Marchi
2020-11-25  1:40   ` Pedro Alves
2020-11-25 19:29     ` Simon Marchi
2020-11-25 19:35       ` Simon Marchi
2020-11-26 14:25         ` Pedro Alves
2020-11-30 19:13           ` Simon Marchi
2020-11-26 14:24       ` Pedro Alves
2020-11-30 20:26         ` Simon Marchi
2020-11-10 21:46 ` [PATCH 10/12] gdb: change linux gdbarch data from post to pre-init Simon Marchi
2020-11-25  1:41   ` Pedro Alves
2020-11-10 21:46 ` [PATCH 11/12] gdb: make displaced stepping implementation capable of managing multiple buffers Simon Marchi
2020-11-25  1:41   ` Pedro Alves
2020-11-30 18:58     ` Simon Marchi
2020-11-30 19:01     ` Simon Marchi
2020-11-10 21:46 ` [PATCH 12/12] gdb: use two displaced step buffers on amd64/Linux Simon Marchi
2020-11-25  1:42   ` Pedro Alves
2020-11-25  6:26     ` Simon Marchi
2020-11-25 20:07       ` Simon Marchi
2020-11-25 20:56         ` Simon Marchi
2020-11-26 21:43           ` Simon Marchi
2020-11-26 22:34             ` Simon Marchi
2020-11-28 18:56             ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).