Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v2 00/17] Fast tracepoint support for ARMv7
@ 2016-06-09 12:56 Antoine Tremblay
  2016-06-09 12:56 ` [PATCH v2 06/17] arm-tdep.c: Use relocation visitor in Thumb 16-bits instruction decoding Antoine Tremblay
                   ` (17 more replies)
  0 siblings, 18 replies; 26+ messages in thread
From: Antoine Tremblay @ 2016-06-09 12:56 UTC (permalink / raw)
  To: gdb-patches; +Cc: Antoine Tremblay

Hi,

This is a v2 of:
https://sourceware.org/ml/gdb-patches/2015-10/msg00195.html

It needs to be applied on top of tracepoints support for ARM see:
https://sourceware.org/ml/gdb-patches/2016-01/msg00111.html

This patch enables fast tracepoints for ARM on Linux.

It has been reworked by Simon Marchi and Antoine Tremblay and the
following features have been added:

  * Relocation of many PC relative instructions.

  * JIT compilation of the condition expression.

There are some limitations:

  * The tracepoint insertion will fail if the distance from the
    instruction to the jump pad is big.

  * It is only possible to place fast tracepoints on 4-byte
    instructions, which also limits the valid locations in Thumb mode.

Known Issues:

There is a possible issue while stepping out of the jump pad as discussed
here: https://sourceware.org/ml/gdb-patches/2016-01/msg00673.html

But this issue is present in x86 with hardware single stepping too. So I
don't think it's related to this series and can be addressed separately.
I'm still mentioning it as it may be relevant while testing software
single stepping out of the jump pad.

Patches:

Patches 1-9: Share instruction decoding code between GDB and GDBServer so
that it can be used for instruction relocation in GDBServer.

Patch 10: Refactors install_fast_tracepoint_jump_pad to pass a pointer to
the tracepoint, instead of separate arguments.

Patch 11: Enables software single stepping out of the jump pad.

Patch 12: Adds all the functions needed to assemble ARM instructions
needed in the jump pad and in the JIT condition evaluation.

Patch 13: Adds fast tracepoint support, without JIT condition evaluation
and PC-relative instructions support.

Patch 14: Adds JIT condition evaluation support.

Patch 15-17: Adds PC-relative instruction relocation support.

Tested on ARMv7 linux {unix, native-gdbserver, native-extended-gdbserver}
no regression observed.

Antoine Tremblay (4):
  Use software single step to step out of a fast tracepoint jump pad
  Add ARM/Thumb instruction assembler for fast tracepoints
  Fast tracepoint support for ARM on Linux
  JIT conditions support for ARM tracepoints.

Simon Marchi (13):
  arm-tdep.c: Replace arguments to decode function by a structure
  arm-tdep.c: Refactor displaced stepping relocation functions
  arm-tdep.c: Move debug printout from decode to copy function
  arm-tdep.c: Use relocation visitor in ARM instruction decoding
  arm-tdep.c: Use relocation visitor in Thumb 32-bits instruction
    decoding
  arm-tdep.c: Use relocation visitor in Thumb 16-bits instruction
    decoding
  Move ARM instruction decode functions to arch/arm-insn-reloc.c
  Move Thumb 32 bits instruction decode functions to
    arch/arm-insn-reloc.c
  Move Thumb 16 bits instruction decode functions to
    arch/arm-insn-reloc.c
  gdbserver: pass pointer to struct tracepoint to
    install_fast_tracepoint_jump_pad
  arm: Move insn_references_pc to common code
  arm fast tracepoints: Relocation of ARM instructions
  arm fast tracepoints: Relocation of Thumb 32-bits instructions

 gdb/Makefile.in                             |   29 +-
 gdb/NEWS                                    |    4 +
 gdb/aarch64-tdep.c                          |    3 +-
 gdb/arch/aarch64-insn.c                     |    3 +-
 gdb/arch/aarch64-insn.h                     |   32 +-
 gdb/arch/arm-insn-emit.c                    | 1550 +++++++++++++++++++++
 gdb/arch/arm-insn-emit.h                    | 1087 +++++++++++++++
 gdb/arch/arm-insn-reloc.c                   |  881 ++++++++++++
 gdb/arch/arm-insn-reloc.h                   |  109 ++
 gdb/arch/arm-insn-utils.c                   |   44 +
 gdb/arch/arm-insn-utils.h                   |   80 ++
 gdb/arch/arm.h                              |    2 +
 gdb/arm-tdep.c                              | 1464 +++++---------------
 gdb/configure.tgt                           |    7 +-
 gdb/gdbserver/Makefile.in                   |   29 +-
 gdb/gdbserver/configure.srv                 |    8 +
 gdb/gdbserver/linux-aarch32-low.c           |    8 -
 gdb/gdbserver/linux-aarch32-low.h           |    8 +
 gdb/gdbserver/linux-aarch64-low.c           |   80 +-
 gdb/gdbserver/linux-arm-ipa.c               |  228 ++++
 gdb/gdbserver/linux-arm-low.c               | 1960 ++++++++++++++++++++++++++-
 gdb/gdbserver/linux-low.c                   |   21 +-
 gdb/gdbserver/linux-low.h                   |    5 +-
 gdb/gdbserver/linux-x86-low.c               |   63 +-
 gdb/gdbserver/target.h                      |   26 +-
 gdb/gdbserver/tracepoint.c                  |  138 +-
 gdb/gdbserver/tracepoint.h                  |  126 ++
 gdb/testsuite/gdb.trace/ftrace-arm-insn.S   |  378 ++++++
 gdb/testsuite/gdb.trace/ftrace-arm-insn.c   |   94 ++
 gdb/testsuite/gdb.trace/ftrace-arm-insn.exp |  111 ++
 gdb/testsuite/lib/trace-support.exp         |    3 +-
 31 files changed, 7130 insertions(+), 1451 deletions(-)
 create mode 100644 gdb/arch/arm-insn-emit.c
 create mode 100644 gdb/arch/arm-insn-emit.h
 create mode 100644 gdb/arch/arm-insn-reloc.c
 create mode 100644 gdb/arch/arm-insn-reloc.h
 create mode 100644 gdb/arch/arm-insn-utils.c
 create mode 100644 gdb/arch/arm-insn-utils.h
 create mode 100644 gdb/gdbserver/linux-arm-ipa.c
 create mode 100644 gdb/testsuite/gdb.trace/ftrace-arm-insn.S
 create mode 100644 gdb/testsuite/gdb.trace/ftrace-arm-insn.c
 create mode 100644 gdb/testsuite/gdb.trace/ftrace-arm-insn.exp

-- 
2.8.1


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

end of thread, other threads:[~2016-06-30 11:46 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 12:56 [PATCH v2 00/17] Fast tracepoint support for ARMv7 Antoine Tremblay
2016-06-09 12:56 ` [PATCH v2 06/17] arm-tdep.c: Use relocation visitor in Thumb 16-bits instruction decoding Antoine Tremblay
2016-06-09 12:56 ` [PATCH v2 07/17] Move ARM instruction decode functions to arch/arm-insn-reloc.c Antoine Tremblay
2016-06-09 12:56 ` [PATCH v2 11/17] Use software single step to step out of a fast tracepoint jump pad Antoine Tremblay
2016-06-09 12:56 ` [PATCH v2 08/17] Move Thumb 32 bits instruction decode functions to arch/arm-insn-reloc.c Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 10/17] gdbserver: pass pointer to struct tracepoint to install_fast_tracepoint_jump_pad Antoine Tremblay
2016-06-15 14:59   ` Marcin Kościelnicki
2016-06-15 15:42     ` Antoine Tremblay
2016-06-16 17:14     ` [PATCH v3] " Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 01/17] arm-tdep.c: Replace arguments to decode function by a structure Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 13/17] Fast tracepoint support for ARM on Linux Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 15/17] arm: Move insn_references_pc to common code Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 14/17] JIT conditions support for ARM tracepoints Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 05/17] arm-tdep.c: Use relocation visitor in Thumb 32-bits instruction decoding Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 09/17] Move Thumb 16 bits instruction decode functions to arch/arm-insn-reloc.c Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 04/17] arm-tdep.c: Use relocation visitor in ARM instruction decoding Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 17/17] arm fast tracepoints: Relocation of Thumb 32-bits instructions Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 02/17] arm-tdep.c: Refactor displaced stepping relocation functions Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 12/17] Add ARM/Thumb instruction assembler for fast tracepoints Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 03/17] arm-tdep.c: Move debug printout from decode to copy function Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 16/17] arm fast tracepoints: Relocation of ARM instructions Antoine Tremblay
2016-06-29 13:55 ` [PATCH v2 00/17] Fast tracepoint support for ARMv7 Antoine Tremblay
2016-06-29 16:59   ` Pedro Alves
2016-06-29 19:15     ` Antoine Tremblay
2016-06-29 20:10       ` Pedro Alves
2016-06-30 11:46         ` Antoine Tremblay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox