Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610986

[PATCH v3 1/3] perf/sdt/x86: Add renaming logic for (missing) 8 bit registers

From Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH v3 1/3] perf/sdt/x86: Add renaming logic for (missing) 8 bit registers
Date 2017-03-28 16:00 +0200
Message-ID <tpZPe-8sh-65@gated-at.bofh.it> (permalink)
References <tpXaG-6Gq-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


I found couple of events using al, bl, cl and dl registers for
argument. These are not directly accepted by uprobe_events and
thus needs to be mapped to ax, bx, cx and dx respectively.

Few ex,

  /usr/bin/qemu-system-s390x
    css_adapter_interrupt: 1@%bl
    css_chpid_add: 1@%cl 1@%sil 1@%dl
    dma_bdrv_io: 8@%rbx 8@%rbp -8@%r14 1@%al

  /usr/bin/postgres
    buffer__read__done: ... -1@-bash -1@%al
    buffer__read__start: ... -1@%al

I don't find any sdt events using ah, bh,... registers. But I
also don't see any reason to not use them, so there might be
rare events using these registers, and if so, perf should have
a renaming logic for them too.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
---
 tools/perf/arch/x86/util/perf_regs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/perf/arch/x86/util/perf_regs.c b/tools/perf/arch/x86/util/perf_regs.c
index d8a8dcf..fa1fd19 100644
--- a/tools/perf/arch/x86/util/perf_regs.c
+++ b/tools/perf/arch/x86/util/perf_regs.c
@@ -40,12 +40,20 @@ struct sdt_name_reg {
 static const struct sdt_name_reg sdt_reg_renamings[] = {
 	SDT_NAME_REG(eax, ax),
 	SDT_NAME_REG(rax, ax),
+	SDT_NAME_REG(al,  ax),
+	SDT_NAME_REG(ah,  ax),
 	SDT_NAME_REG(ebx, bx),
 	SDT_NAME_REG(rbx, bx),
+	SDT_NAME_REG(bl,  bx),
+	SDT_NAME_REG(bh,  bx),
 	SDT_NAME_REG(ecx, cx),
 	SDT_NAME_REG(rcx, cx),
+	SDT_NAME_REG(cl,  cx),
+	SDT_NAME_REG(ch,  cx),
 	SDT_NAME_REG(edx, dx),
 	SDT_NAME_REG(rdx, dx),
+	SDT_NAME_REG(dl,  dx),
+	SDT_NAME_REG(dh,  dx),
 	SDT_NAME_REG(esi, si),
 	SDT_NAME_REG(rsi, si),
 	SDT_NAME_REG(sil, si),
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] perf/sdt: Hardening argument support Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-03-28 13:10 +0200
  [PATCH v3 3/3] perf/sdt/powerpc: Add argument support Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-03-28 14:10 +0200
    [tip:perf/core] perf sdt powerpc: Add argument support tip-bot for Ravi Bangoria <tipbot@zytor.com> - 2017-04-05 08:00 +0200
  [PATCH v3 2/3] perf/sdt/x86: Move OP parser to tools/perf/arch/x86/ Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-03-28 15:40 +0200
    [tip:perf/core] perf/sdt/x86: Move OP parser to  tools/perf/arch/x86/ tip-bot for Ravi Bangoria <tipbot@zytor.com> - 2017-04-02 21:20 +0200
  [PATCH v3 1/3] perf/sdt/x86: Add renaming logic for (missing) 8 bit registers Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-03-28 16:00 +0200
    [tip:perf/core] perf/sdt/x86: Add renaming logic for (missing) 8  bit registers tip-bot for Ravi Bangoria <tipbot@zytor.com> - 2017-04-02 21:20 +0200
  Re: [PATCH v3 0/3] perf/sdt: Hardening argument support Masami Hiramatsu <mhiramat@kernel.org> - 2017-03-28 17:40 +0200
    Re: [PATCH v3 0/3] perf/sdt: Hardening argument support Arnaldo Carvalho de Melo <acme@redhat.com> - 2017-03-28 17:50 +0200
      Re: [PATCH v3 0/3] perf/sdt: Hardening argument support Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-04-01 08:30 +0200

csiph-web