public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC][PATCH 00/15] Fast tracepoint support for ARMv7
@ 2015-10-14 11:14 henrik.wallin
  2015-10-14 11:14 ` [RFC][PATCH 01/15] Fix endian problem for tracepoint enabled flag henrik.wallin
                   ` (15 more replies)
  0 siblings, 16 replies; 44+ messages in thread
From: henrik.wallin @ 2015-10-14 11:14 UTC (permalink / raw)
  To: gdb-patches

From: Henrik Wallin <henrik.wallin@windriver.com>

Hi,

This implements fast tracepoint support for ARMv7. It handles both arm
and thumb mode.
The first 8 patches are bug-fixes and not directly related to the
ARM support and should probably be separated out from this patch set,
but I keep them in here for now. The following 7 patches contains the
ARM support for fast tracepoint.

I post this as an RFC at this point, as I'm not actively working
with this. I will response and post updates to this series, but any major
improvements / changes will be hard to achieve for me at this point.

There are some left-over issues:
- The breakpoint based tracepoints does not work. There is another
  thread [1] providing needed gdbserver changes to achieve that. Those
  patches together with these should provide full tracepoint support for
  ARMv7. (Not verified)

- Patch "gdbserver: Add help functions to get arm/thumb mode" needs a
  better solution.

- How to correctly identify that the running ARM cpu is supporting
  ARMv7-a.

- No updates done to the testsuite.

Known limitations
- Current implementation will refuse all instruction that do
  any relative operation with the PC counter, as relocating such an
  instruction is non-trivial. This can be improved as some of those
  instructions can be re-written with alternative instruction(s).

- There is no included jit tracepoint expression optimization
  included. This should be possible to add.

- Can only set a tracepoint at a 4 bytes instructions, as a 2 bytes
  slot is too small for the needed jump instruction. This feels like a
  natural limitation for this functionality, but means that for thumb
  the user will hit this limitation quite often.

- The inserted 4 byte jump instruction has a limitation on how far it
  can branch. The length is validated, but if too far it will not be
  possible to insert the tracepoint. With very large programs this
  might be an issue, but again feels like a natural limitation.
  
Testing
- The internal testsystem has not been run, but I will look into
  that. I've run other tests on it though and I have no known
  problems.

Patch description:

Patches are based on master, e753e154bf8a1f507b43e03dec04b341dde3f429

patch 1-8:
Bugfixes in generic code. Not specific to ARM. Should probably be
split out from this patch set.

patch 9-13: Adds new code (but not activated) for ARM tracepoints.

patch 14-15: Activates and makes tracepoints available.

[1]: https://sourceware.org/ml/gdb-patches/2015-09/msg00221.html

Henrik Wallin (9):
  Fix mmap usage of MAP_FIXED for multiple pages.
  gdbserver: Move pointer dereference to after assert checks.
  gdb: Add relocate instruction helpers
  gdb: Add arm_fast_tracepoint_valid_at
  gdbserver: Add helper functions to create arm instructions
  gdbserver: Add help functions to get arm/thumb mode
  gdbserver: Add arm_install_fast_tracepoint_jump_pad
  gdbserver: Add linux-arm-ipa.c
  gdb/gdbserver: Enable tracepoint for ARM

Par Olsson (6):
  Fix endian problem for tracepoint enabled flag
  Fix internal error when saving fast tracepoint definitions
  Fix crash in enable/disable after detach
  Fix crash in tstatus after detach
  Fix crash when tstart after detach.
  Add possibility to restart trace after tfind.

 gdb/arm-tdep.c                | 658 ++++++++++++++++++++++++++++++++++++++++++
 gdb/breakpoint.c              |   2 +-
 gdb/common/agent.c            |   7 +
 gdb/gdbserver/Makefile.in     |   6 +
 gdb/gdbserver/configure.srv   |   1 +
 gdb/gdbserver/linux-arm-ipa.c |  97 +++++++
 gdb/gdbserver/linux-arm-low.c | 410 +++++++++++++++++++++++++-
 gdb/gdbserver/tracepoint.c    |  33 ++-
 gdb/tracepoint.c              |  14 +-
 9 files changed, 1218 insertions(+), 10 deletions(-)
 create mode 100644 gdb/gdbserver/linux-arm-ipa.c

-- 
2.1.4

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

end of thread, other threads:[~2015-11-24 16:29 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14 11:14 [RFC][PATCH 00/15] Fast tracepoint support for ARMv7 henrik.wallin
2015-10-14 11:14 ` [RFC][PATCH 01/15] Fix endian problem for tracepoint enabled flag henrik.wallin
2015-10-15 17:16   ` Pedro Alves
2015-10-29 18:20     ` Wallin, Henrik
2015-10-14 11:14 ` [RFC][PATCH 02/15] Fix internal error when saving fast tracepoint definitions henrik.wallin
2015-10-15 17:19   ` Pedro Alves
2015-10-14 11:14 ` [RFC][PATCH 04/15] Fix crash in tstatus after detach henrik.wallin
2015-10-14 11:48   ` Gary Benson
2015-10-29 18:45     ` Wallin, Henrik
2015-10-30 14:15       ` Gary Benson
2015-10-15 17:22   ` Pedro Alves
2015-10-29 18:31     ` Wallin, Henrik
2015-10-14 15:07 ` [RFC][PATCH 03/15] Fix crash in enable/disable " henrik.wallin
2015-10-15 16:30   ` Pedro Alves
2015-10-29 18:29     ` Wallin, Henrik
2015-10-14 15:07 ` [RFC][PATCH 08/15] gdbserver: Move pointer dereference to after assert checks henrik.wallin
2015-10-15 17:29   ` Pedro Alves
2015-10-29 19:01     ` Wallin, Henrik
2015-10-30  0:20       ` Antoine Tremblay
2015-10-30  5:25         ` Antoine Tremblay
2015-10-14 15:07 ` [RFC][PATCH 10/15] gdb: Add arm_fast_tracepoint_valid_at henrik.wallin
2015-10-27 13:36   ` Yao Qi
2015-10-29 22:36     ` Wallin, Henrik
2015-10-14 15:07 ` [RFC][PATCH 07/15] Fix mmap usage of MAP_FIXED for multiple pages henrik.wallin
2015-10-14 15:26   ` Andreas Schwab
2015-10-29 17:58     ` Wallin, Henrik
2015-10-14 15:07 ` [RFC][PATCH 12/15] gdbserver: Add help functions to get arm/thumb mode henrik.wallin
2015-10-14 15:07 ` [RFC][PATCH 06/15] Add possibility to restart trace after tfind henrik.wallin
2015-10-15 17:26   ` Pedro Alves
2015-10-14 15:07 ` [RFC][PATCH 05/15] Fix crash when tstart after detach henrik.wallin
2015-10-15 17:24   ` Pedro Alves
2015-10-14 15:08 ` [RFC][PATCH 15/15] gdb/gdbserver: Enable tracepoint for ARM henrik.wallin
2015-10-14 15:08 ` [RFC][PATCH 11/15] gdbserver: Add helper functions to create arm instructions henrik.wallin
2015-10-14 15:12 ` [RFC][PATCH 14/15] gdbserver: Add linux-arm-ipa.c henrik.wallin
2015-10-27 13:36   ` Yao Qi
2015-10-14 15:15 ` [RFC][PATCH 13/15] gdbserver: Add arm_install_fast_tracepoint_jump_pad henrik.wallin
2015-10-14 15:21 ` [RFC][PATCH 09/15] gdb: Add relocate instruction helpers henrik.wallin
2015-10-27 13:30   ` Yao Qi
2015-10-29 20:40     ` Wallin, Henrik
2015-11-20 18:06     ` Simon Marchi
2015-11-23 11:00       ` Yao Qi
2015-11-24 16:29         ` Simon Marchi
2015-10-27 13:23 ` [RFC][PATCH 00/15] Fast tracepoint support for ARMv7 Yao Qi
2015-10-30  1:52   ` Wallin, Henrik

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).