diff mbox

[25/31] gdbserver/linux-low: turn fast tracepoint ops into methods

Message ID 0814359d1672912726e02dc48f0460b78767214c.1583529167.git.tankut.baris.aktemur@intel.com
State New
Headers show

Commit Message

Tankut Baris Aktemur March 6, 2020, 9:31 p.m. UTC
gdbserver/ChangeLog:
2020-03-06  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	Remove the 'install_fast_tracepoint_jump_pad' and
	'get_min_fast_tracepoint_insn_len' linux target ops to let the
	concrete linux target define the ops by overriding the declarations
	of process_stratum_target.

	* linux-low.h (struct linux_target_ops): Remove the ops.
	(class linux_process_target) <supports_fast_tracepoints>
	<install_fast_tracepoint_jump_pad>
	<get_min_fast_tracepoint_insn_len>: Remove.
	* linux-low.cc (linux_process_target::supports_fast_tracepoints)
	(linux_process_target::install_fast_tracepoint_jump_pad)
	(linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
	* linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
	<install_fast_tracepoint_jump_pad>
	<get_min_fast_tracepoint_insn_len>: Declare.
	(x86_target::supports_fast_tracepoints): Define.
	(x86_install_fast_tracepoint_jump_pad): Turn into...
	(x86_target::install_fast_tracepoint_jump_pad): ...this.
	(x86_get_min_fast_tracepoint_insn_len): Turn into...
	(x86_target::get_min_fast_tracepoint_insn_len): ...this.
	(the_low_target): Remove the op fields.
	* linux-aarch64-low.cc (class aarch64_target)
	<supports_fast_tracepoints>
	<install_fast_tracepoint_jump_pad>
	<get_min_fast_tracepoint_insn_len>: Declare.
	(aarch64_target::supports_fast_tracepoints): Define.
	(aarch64_install_fast_tracepoint_jump_pad): Turn into...
	(aarch64_target::install_fast_tracepoint_jump_pad): ...this.
	(aarch64_get_min_fast_tracepoint_insn_len): Turn into...
	(aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
	(the_low_target): Remove the op fields.
	* linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
	<install_fast_tracepoint_jump_pad>
	<get_min_fast_tracepoint_insn_len>: Declare.
	(ppc_target::supports_fast_tracepoints): Define.
	(ppc_install_fast_tracepoint_jump_pad): Turn into...
	(ppc_target::install_fast_tracepoint_jump_pad): ...this.
	(ppc_get_min_fast_tracepoint_insn_len): Turn into...
	(ppc_target::get_min_fast_tracepoint_insn_len): ...this.
	(the_low_target): Remove the op fields.
	* linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
	<install_fast_tracepoint_jump_pad>
	<get_min_fast_tracepoint_insn_len>: Declare.
	(s390_target::supports_fast_tracepoints): Define.
	(s390_install_fast_tracepoint_jump_pad): Turn into...
	(s390_target::install_fast_tracepoint_jump_pad): ...this.
	(s390_get_min_fast_tracepoint_insn_len): Turn into...
	(s390_target::get_min_fast_tracepoint_insn_len): ...this.
	(the_low_target): Remove the op fields.
	* linux-arm-low.cc (the_low_target): Remove the op fields.
	* linux-bfin-low.cc (the_low_target): Ditto.
	* linux-crisv32-low.cc (the_low_target): Ditto.
	* linux-m32r-low.cc (the_low_target): Ditto.
	* linux-m68k-low.cc (the_low_target): Ditto.
	* linux-sh-low.cc (the_low_target): Ditto.
	* linux-tic6x-low.cc (the_low_target): Ditto.
	* linux-tile-low.cc (the_low_target): Ditto.
	* linux-xtensa-low.cc (the_low_target): Ditto.
---
 gdbserver/linux-aarch64-low.cc | 50 ++++++++++++++++++++-------------
 gdbserver/linux-arm-low.cc     |  2 --
 gdbserver/linux-bfin-low.cc    |  2 --
 gdbserver/linux-crisv32-low.cc |  2 --
 gdbserver/linux-low.cc         | 29 -------------------
 gdbserver/linux-low.h          | 37 ------------------------
 gdbserver/linux-m32r-low.cc    |  2 --
 gdbserver/linux-m68k-low.cc    |  2 --
 gdbserver/linux-ppc-low.cc     | 51 ++++++++++++++++++++++------------
 gdbserver/linux-s390-low.cc    | 50 ++++++++++++++++++++-------------
 gdbserver/linux-sh-low.cc      |  2 --
 gdbserver/linux-tic6x-low.cc   |  2 --
 gdbserver/linux-tile-low.cc    |  2 --
 gdbserver/linux-x86-low.cc     | 51 ++++++++++++++++++++++------------
 gdbserver/linux-xtensa-low.cc  |  2 --
 15 files changed, 128 insertions(+), 158 deletions(-)
diff mbox

Patch

diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc
index 5477bd60316..30d64d8deca 100644
--- a/gdbserver/linux-aarch64-low.cc
+++ b/gdbserver/linux-aarch64-low.cc
@@ -68,6 +68,18 @@  public:
 
   bool supports_tracepoints () override;
 
+  bool supports_fast_tracepoints () override;
+
+  int install_fast_tracepoint_jump_pad
+    (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
+     CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
+     CORE_ADDR *trampoline, ULONGEST *trampoline_size,
+     unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
+     CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
+     char *err) override;
+
+  int get_min_fast_tracepoint_insn_len () override;
+
 protected:
 
   void low_arch_setup () override;
@@ -1963,23 +1975,23 @@  static const struct aarch64_insn_visitor visitor =
   aarch64_ftrace_insn_reloc_others,
 };
 
-/* Implementation of linux_target_ops method
+bool
+aarch64_target::supports_fast_tracepoints ()
+{
+  return true;
+}
+
+/* Implementation of target ops method
    "install_fast_tracepoint_jump_pad".  */
 
-static int
-aarch64_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
-					  CORE_ADDR tpaddr,
-					  CORE_ADDR collector,
-					  CORE_ADDR lockaddr,
-					  ULONGEST orig_size,
-					  CORE_ADDR *jump_entry,
-					  CORE_ADDR *trampoline,
-					  ULONGEST *trampoline_size,
-					  unsigned char *jjump_pad_insn,
-					  ULONGEST *jjump_pad_insn_size,
-					  CORE_ADDR *adjusted_insn_addr,
-					  CORE_ADDR *adjusted_insn_addr_end,
-					  char *err)
+int
+aarch64_target::install_fast_tracepoint_jump_pad
+  (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
+   CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
+   CORE_ADDR *trampoline, ULONGEST *trampoline_size,
+   unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
+   CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
+   char *err)
 {
   uint32_t buf[256];
   uint32_t *p = buf;
@@ -3088,11 +3100,11 @@  aarch64_emit_ops (void)
   return &aarch64_emit_ops_impl;
 }
 
-/* Implementation of linux_target_ops method
+/* Implementation of target ops method
    "get_min_fast_tracepoint_insn_len".  */
 
-static int
-aarch64_get_min_fast_tracepoint_insn_len (void)
+int
+aarch64_target::get_min_fast_tracepoint_insn_len ()
 {
   return 4;
 }
@@ -3152,9 +3164,7 @@  aarch64_supports_hardware_single_step (void)
 
 struct linux_target_ops the_low_target =
 {
-  aarch64_install_fast_tracepoint_jump_pad,
   aarch64_emit_ops,
-  aarch64_get_min_fast_tracepoint_insn_len,
   aarch64_supports_range_stepping,
   aarch64_supports_hardware_single_step,
   aarch64_get_syscall_trapinfo,
diff --git a/gdbserver/linux-arm-low.cc b/gdbserver/linux-arm-low.cc
index c5c27fd7435..f4cd374c095 100644
--- a/gdbserver/linux-arm-low.cc
+++ b/gdbserver/linux-arm-low.cc
@@ -1119,9 +1119,7 @@  arm_target::get_regs_info ()
 }
 
 struct linux_target_ops the_low_target = {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   arm_supports_hardware_single_step,
   arm_get_syscall_trapinfo,
diff --git a/gdbserver/linux-bfin-low.cc b/gdbserver/linux-bfin-low.cc
index 2caad4910dc..36112be6aa9 100644
--- a/gdbserver/linux-bfin-low.cc
+++ b/gdbserver/linux-bfin-low.cc
@@ -165,9 +165,7 @@  bfin_target::get_regs_info ()
 }
 
 struct linux_target_ops the_low_target = {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   bfin_supports_hardware_single_step,
 };
diff --git a/gdbserver/linux-crisv32-low.cc b/gdbserver/linux-crisv32-low.cc
index ccb14b4077a..e44a6c25067 100644
--- a/gdbserver/linux-crisv32-low.cc
+++ b/gdbserver/linux-crisv32-low.cc
@@ -470,9 +470,7 @@  crisv32_target::get_regs_info ()
 }
 
 struct linux_target_ops the_low_target = {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   cris_supports_hardware_single_step,
 };
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index a183aced74d..fd820233c5b 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6496,29 +6496,6 @@  linux_process_target::done_accessing_memory ()
     target_unpause_all (true);
 }
 
-bool
-linux_process_target::supports_fast_tracepoints ()
-{
-  return the_low_target.install_fast_tracepoint_jump_pad != nullptr;
-}
-
-int
-linux_process_target::install_fast_tracepoint_jump_pad
-  (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
-   CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
-   CORE_ADDR *trampoline, ULONGEST *trampoline_size,
-   unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
-   CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
-   char *err)
-{
-  return (*the_low_target.install_fast_tracepoint_jump_pad)
-    (tpoint, tpaddr, collector, lockaddr, orig_size,
-     jump_entry, trampoline, trampoline_size,
-     jjump_pad_insn, jjump_pad_insn_size,
-     adjusted_insn_addr, adjusted_insn_addr_end,
-     err);
-}
-
 emit_ops *
 linux_process_target::emit_ops ()
 {
@@ -6528,12 +6505,6 @@  linux_process_target::emit_ops ()
     return NULL;
 }
 
-int
-linux_process_target::get_min_fast_tracepoint_insn_len ()
-{
-  return (*the_low_target.get_min_fast_tracepoint_insn_len) ();
-}
-
 /* Extract &phdr and num_phdr in the inferior.  Return 0 on success.  */
 
 static int
diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h
index 999277eed5d..7330d9bfb66 100644
--- a/gdbserver/linux-low.h
+++ b/gdbserver/linux-low.h
@@ -131,29 +131,10 @@  struct lwp_info;
 
 struct linux_target_ops
 {
-  /* Install a fast tracepoint jump pad.  See target.h for
-     comments.  */
-  int (*install_fast_tracepoint_jump_pad) (CORE_ADDR tpoint, CORE_ADDR tpaddr,
-					   CORE_ADDR collector,
-					   CORE_ADDR lockaddr,
-					   ULONGEST orig_size,
-					   CORE_ADDR *jump_entry,
-					   CORE_ADDR *trampoline,
-					   ULONGEST *trampoline_size,
-					   unsigned char *jjump_pad_insn,
-					   ULONGEST *jjump_pad_insn_size,
-					   CORE_ADDR *adjusted_insn_addr,
-					   CORE_ADDR *adjusted_insn_addr_end,
-					   char *err);
-
   /* Return the bytecode operations vector for the current inferior.
      Returns NULL if bytecode compilation is not supported.  */
   struct emit_ops *(*emit_ops) (void);
 
-  /* Return the minimum length of an instruction that can be safely overwritten
-     for use as a fast tracepoint.  */
-  int (*get_min_fast_tracepoint_insn_len) (void);
-
   /* Returns true if the low target supports range stepping.  */
   int (*supports_range_stepping) (void);
 
@@ -305,24 +286,6 @@  class linux_process_target : public process_stratum_target
 
   void stabilize_threads () override;
 
-  bool supports_fast_tracepoints () override;
-
-  int install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
-					CORE_ADDR tpaddr,
-					CORE_ADDR collector,
-					CORE_ADDR lockaddr,
-					ULONGEST orig_size,
-					CORE_ADDR *jump_entry,
-					CORE_ADDR *trampoline,
-					ULONGEST *trampoline_size,
-					unsigned char *jjump_pad_insn,
-					ULONGEST *jjump_pad_insn_size,
-					CORE_ADDR *adjusted_insn_addr,
-					CORE_ADDR *adjusted_insn_addr_end,
-					char *err) override;
-
-  int get_min_fast_tracepoint_insn_len () override;
-
   struct emit_ops *emit_ops () override;
 
   bool supports_disable_randomization () override;
diff --git a/gdbserver/linux-m32r-low.cc b/gdbserver/linux-m32r-low.cc
index 36d7c7451e1..03889b0d990 100644
--- a/gdbserver/linux-m32r-low.cc
+++ b/gdbserver/linux-m32r-low.cc
@@ -163,9 +163,7 @@  m32r_target::get_regs_info ()
 }
 
 struct linux_target_ops the_low_target = {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   m32r_supports_hardware_single_step,
 };
diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc
index 1ba5b827dff..f2a5718234f 100644
--- a/gdbserver/linux-m68k-low.cc
+++ b/gdbserver/linux-m68k-low.cc
@@ -259,9 +259,7 @@  m68k_supports_hardware_single_step (void)
 }
 
 struct linux_target_ops the_low_target = {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   m68k_supports_hardware_single_step,
 };
diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
index 16eff5dcbf0..d75c6ba7d9d 100644
--- a/gdbserver/linux-ppc-low.cc
+++ b/gdbserver/linux-ppc-low.cc
@@ -67,6 +67,18 @@  public:
 
   bool supports_tracepoints () override;
 
+  bool supports_fast_tracepoints () override;
+
+  int install_fast_tracepoint_jump_pad
+    (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
+     CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
+     CORE_ADDR *trampoline, ULONGEST *trampoline_size,
+     unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
+     CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
+     char *err) override;
+
+  int get_min_fast_tracepoint_insn_len () override;
+
 protected:
 
   void low_arch_setup () override;
@@ -1572,22 +1584,29 @@  ppc_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
   *to += 4;
 }
 
+bool
+ppc_target::supports_fast_tracepoints ()
+{
+  return true;
+}
+
 /* Implement install_fast_tracepoint_jump_pad of target_ops.
    See target.h for details.  */
 
-static int
-ppc_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
-				      CORE_ADDR collector,
-				      CORE_ADDR lockaddr,
-				      ULONGEST orig_size,
-				      CORE_ADDR *jump_entry,
-				      CORE_ADDR *trampoline,
-				      ULONGEST *trampoline_size,
-				      unsigned char *jjump_pad_insn,
-				      ULONGEST *jjump_pad_insn_size,
-				      CORE_ADDR *adjusted_insn_addr,
-				      CORE_ADDR *adjusted_insn_addr_end,
-				      char *err)
+int
+ppc_target::install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
+					      CORE_ADDR tpaddr,
+					      CORE_ADDR collector,
+					      CORE_ADDR lockaddr,
+					      ULONGEST orig_size,
+					      CORE_ADDR *jump_entry,
+					      CORE_ADDR *trampoline,
+					      ULONGEST *trampoline_size,
+					      unsigned char *jjump_pad_insn,
+					      ULONGEST *jjump_pad_insn_size,
+					      CORE_ADDR *adjusted_insn_addr,
+					      CORE_ADDR *adjusted_insn_addr_end,
+					      char *err)
 {
   uint32_t buf[256];
   uint32_t *p = buf;
@@ -1781,8 +1800,8 @@  ppc_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
 
 /* Returns the minimum instruction length for installing a tracepoint.  */
 
-static int
-ppc_get_min_fast_tracepoint_insn_len (void)
+int
+ppc_target::get_min_fast_tracepoint_insn_len ()
 {
   return 4;
 }
@@ -3435,9 +3454,7 @@  ppc_get_ipa_tdesc_idx (void)
 }
 
 struct linux_target_ops the_low_target = {
-  ppc_install_fast_tracepoint_jump_pad,
   ppc_emit_ops,
-  ppc_get_min_fast_tracepoint_insn_len,
   NULL, /* supports_range_stepping */
   ppc_supports_hardware_single_step,
   NULL, /* get_syscall_trapinfo */
diff --git a/gdbserver/linux-s390-low.cc b/gdbserver/linux-s390-low.cc
index 3171dc4397e..9ac84fb20e0 100644
--- a/gdbserver/linux-s390-low.cc
+++ b/gdbserver/linux-s390-low.cc
@@ -70,6 +70,18 @@  public:
 
   bool supports_tracepoints () override;
 
+  bool supports_fast_tracepoints () override;
+
+  int install_fast_tracepoint_jump_pad
+    (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
+     CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
+     CORE_ADDR *trampoline, ULONGEST *trampoline_size,
+     unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
+     CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
+     char *err) override;
+
+  int get_min_fast_tracepoint_insn_len () override;
+
   void low_collect_ptrace_register (regcache *regcache, int regno,
 				    char *buf) override;
 
@@ -1249,23 +1261,23 @@  s390_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc, int is_64)
   return 0;
 }
 
-/* Implementation of linux_target_ops method
+bool
+s390_target::supports_fast_tracepoints ()
+{
+  return true;
+}
+
+/* Implementation of target ops method
    "install_fast_tracepoint_jump_pad".  */
 
-static int
-s390_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
-				       CORE_ADDR tpaddr,
-				       CORE_ADDR collector,
-				       CORE_ADDR lockaddr,
-				       ULONGEST orig_size,
-				       CORE_ADDR *jump_entry,
-				       CORE_ADDR *trampoline,
-				       ULONGEST *trampoline_size,
-				       unsigned char *jjump_pad_insn,
-				       ULONGEST *jjump_pad_insn_size,
-				       CORE_ADDR *adjusted_insn_addr,
-				       CORE_ADDR *adjusted_insn_addr_end,
-				       char *err)
+int
+s390_target::install_fast_tracepoint_jump_pad
+  (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
+   CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
+   CORE_ADDR *trampoline, ULONGEST *trampoline_size,
+   unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
+   CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
+   char *err)
 {
   int i;
   int64_t loffset;
@@ -1419,11 +1431,11 @@  s390_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
   return 0;
 }
 
-/* Implementation of linux_target_ops method
+/* Implementation of target ops method
    "get_min_fast_tracepoint_insn_len".  */
 
-static int
-s390_get_min_fast_tracepoint_insn_len (void)
+int
+s390_target::get_min_fast_tracepoint_insn_len ()
 {
   /* We only support using 6-byte jumps to reach the tracepoint code.
      If the tracepoint buffer were allocated sufficiently close (64kiB)
@@ -2843,9 +2855,7 @@  s390_emit_ops (void)
 }
 
 struct linux_target_ops the_low_target = {
-  s390_install_fast_tracepoint_jump_pad,
   s390_emit_ops,
-  s390_get_min_fast_tracepoint_insn_len,
   NULL, /* supports_range_stepping */
   s390_supports_hardware_single_step,
   NULL, /* get_syscall_trapinfo */
diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc
index bdbd004586b..26823237a59 100644
--- a/gdbserver/linux-sh-low.cc
+++ b/gdbserver/linux-sh-low.cc
@@ -194,9 +194,7 @@  sh_target::low_arch_setup ()
 }
 
 struct linux_target_ops the_low_target = {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   sh_supports_hardware_single_step,
 };
diff --git a/gdbserver/linux-tic6x-low.cc b/gdbserver/linux-tic6x-low.cc
index 5bb2b415a17..cc699e1d2d8 100644
--- a/gdbserver/linux-tic6x-low.cc
+++ b/gdbserver/linux-tic6x-low.cc
@@ -425,9 +425,7 @@  tic6x_target::get_regs_info ()
 }
 
 struct linux_target_ops the_low_target = {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   tic6x_supports_hardware_single_step,
 };
diff --git a/gdbserver/linux-tile-low.cc b/gdbserver/linux-tile-low.cc
index 520c11409a4..895f2ccd5e7 100644
--- a/gdbserver/linux-tile-low.cc
+++ b/gdbserver/linux-tile-low.cc
@@ -226,9 +226,7 @@  tile_supports_hardware_single_step (void)
 
 struct linux_target_ops the_low_target =
 {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   tile_supports_hardware_single_step,
 };
diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc
index b6b8209ff57..d4d78286843 100644
--- a/gdbserver/linux-x86-low.cc
+++ b/gdbserver/linux-x86-low.cc
@@ -112,6 +112,18 @@  public:
 
   bool supports_tracepoints () override;
 
+  bool supports_fast_tracepoints () override;
+
+  int install_fast_tracepoint_jump_pad
+    (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
+     CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
+     CORE_ADDR *trampoline, ULONGEST *trampoline_size,
+     unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
+     CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
+     char *err) override;
+
+  int get_min_fast_tracepoint_insn_len () override;
+
 protected:
 
   void low_arch_setup () override;
@@ -1518,19 +1530,26 @@  i386_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
   return 0;
 }
 
-static int
-x86_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
-				      CORE_ADDR collector,
-				      CORE_ADDR lockaddr,
-				      ULONGEST orig_size,
-				      CORE_ADDR *jump_entry,
-				      CORE_ADDR *trampoline,
-				      ULONGEST *trampoline_size,
-				      unsigned char *jjump_pad_insn,
-				      ULONGEST *jjump_pad_insn_size,
-				      CORE_ADDR *adjusted_insn_addr,
-				      CORE_ADDR *adjusted_insn_addr_end,
-				      char *err)
+bool
+x86_target::supports_fast_tracepoints ()
+{
+  return true;
+}
+
+int
+x86_target::install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
+					      CORE_ADDR tpaddr,
+					      CORE_ADDR collector,
+					      CORE_ADDR lockaddr,
+					      ULONGEST orig_size,
+					      CORE_ADDR *jump_entry,
+					      CORE_ADDR *trampoline,
+					      ULONGEST *trampoline_size,
+					      unsigned char *jjump_pad_insn,
+					      ULONGEST *jjump_pad_insn_size,
+					      CORE_ADDR *adjusted_insn_addr,
+					      CORE_ADDR *adjusted_insn_addr_end,
+					      char *err)
 {
 #ifdef __x86_64__
   if (is_64bit_tdesc ())
@@ -1559,8 +1578,8 @@  x86_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
 /* Return the minimum instruction length for fast tracepoints on x86/x86-64
    architectures.  */
 
-static int
-x86_get_min_fast_tracepoint_insn_len (void)
+int
+x86_target::get_min_fast_tracepoint_insn_len ()
 {
   static int warned_about_fast_tracepoints = 0;
 
@@ -2964,9 +2983,7 @@  x86_get_ipa_tdesc_idx (void)
 
 struct linux_target_ops the_low_target =
 {
-  x86_install_fast_tracepoint_jump_pad,
   x86_emit_ops,
-  x86_get_min_fast_tracepoint_insn_len,
   x86_supports_range_stepping,
   x86_supports_hardware_single_step,
   x86_get_syscall_trapinfo,
diff --git a/gdbserver/linux-xtensa-low.cc b/gdbserver/linux-xtensa-low.cc
index 93e74aef705..4aab5fec513 100644
--- a/gdbserver/linux-xtensa-low.cc
+++ b/gdbserver/linux-xtensa-low.cc
@@ -331,9 +331,7 @@  xtensa_target::get_regs_info ()
 }
 
 struct linux_target_ops the_low_target = {
-  NULL, /* install_fast_tracepoint_jump_pad */
   NULL, /* emit_ops */
-  NULL, /* get_min_fast_tracepoint_insn_len */
   NULL, /* supports_range_stepping */
   xtensa_supports_hardware_single_step,
 };