From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62982 invoked by alias); 5 Jul 2016 13:41:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 62961 invoked by uid 89); 5 Jul 2016 13:41:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=201601, 2016-01, antoine, Share X-HELO: usplmg21.ericsson.net Received: from usplmg21.ericsson.net (HELO usplmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 05 Jul 2016 13:41:04 +0000 Received: from EUSAAHC008.ericsson.se (Unknown_Domain [147.117.188.96]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id 38.66.03614.DA8BB775; Tue, 5 Jul 2016 15:39:57 +0200 (CEST) Received: from elxa4wqvvz1.dyn.mo.ca.am.ericsson.se (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.96) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 5 Jul 2016 09:40:49 -0400 From: Antoine Tremblay To: CC: Antoine Tremblay Subject: [PATCH v3 00/18] Fast tracepoint support for ARMv7 Date: Tue, 05 Jul 2016 13:41:00 -0000 Message-ID: <1467726030-13020-1-git-send-email-antoine.tremblay@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00046.txt.bz2 Hi, In this v3: I realized then testing something else that a fast tracepoint in an infinite loop would crash the inferiror. So I added patch: "Export tracing control breakpoints functions via global function pointers" That fixes this issue. The intro is also updated, removing the possible single step issue. -- Here's a link to the original V1 https://sourceware.org/ml/gdb-patches/2015-10/msg00195.html This series 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. 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: Exports the tracing breakpoint control functions. Patch 14: Adds fast tracepoint support, without JIT condition evaluation and PC-relative instructions support. Patch 15: Adds JIT condition evaluation support. Patch 16-18: Adds PC-relative instruction relocation support. Tested on ARMv7 linux {unix, native-gdbserver, native-extended-gdbserver} no regression observed. Antoine Tremblay (5): Use software single step to step out of a fast tracepoint jump pad Add ARM/Thumb instruction assembler for fast tracepoints Export tracing control breakpoints functions via global function pointers 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 | 1957 ++++++++++++++++++++++- gdb/gdbserver/linux-low.c | 21 +- gdb/gdbserver/linux-low.h | 5 +- gdb/gdbserver/linux-ppc-low.c | 21 +- gdb/gdbserver/linux-s390-low.c | 13 +- gdb/gdbserver/linux-x86-low.c | 63 +- gdb/gdbserver/target.h | 26 +- gdb/gdbserver/tracepoint.c | 232 +-- 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/gdb.trace/ftrace-flush-buffer.c | 42 + gdb/testsuite/gdb.trace/ftrace-flush-buffer.exp | 98 ++ gdb/testsuite/lib/trace-support.exp | 3 +- 35 files changed, 7357 insertions(+), 1489 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 create mode 100644 gdb/testsuite/gdb.trace/ftrace-flush-buffer.c create mode 100644 gdb/testsuite/gdb.trace/ftrace-flush-buffer.exp -- 2.8.1