All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Alexis Berlemont <alexis.berlemont@gmail.com>,
	Hemant Kumar <hemant@linux.vnet.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"Naveen N . Rao" <naveen.n.rao@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 2/9] perf/sdt/x86: Add renaming logic for (missing) 8 bit registers
Date: Fri, 31 Mar 2017 23:10:54 -0300	[thread overview]
Message-ID: <20170401021101.10198-3-acme@kernel.org> (raw)
In-Reply-To: <20170401021101.10198-1-acme@kernel.org>

From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>

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.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170328094754.3156-2-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 d8a8dcf761f7..fa1fd196837d 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

  parent reply	other threads:[~2017-04-01  2:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01  2:10 [GIT PULL 0/9] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-04-01  2:10 ` Arnaldo Carvalho de Melo
2017-04-01  2:10 ` [PATCH 1/9] perf tools: Remove support for command aliases Arnaldo Carvalho de Melo
2017-04-01  2:10 ` Arnaldo Carvalho de Melo [this message]
2017-04-01  2:10 ` [PATCH 3/9] perf/sdt/x86: Move OP parser to tools/perf/arch/x86/ Arnaldo Carvalho de Melo
2017-04-01  2:10 ` [PATCH 4/9] perf report: Drop cycles 0 for LBR print Arnaldo Carvalho de Melo
2017-04-01  2:10 ` [PATCH 5/9] perf trace: Handle unpaired raw_syscalls:sys_exit event Arnaldo Carvalho de Melo
2017-04-01  2:10 ` [PATCH 6/9] perf utils: Fix spelling mistake: "Invalud" -> "Invalid" Arnaldo Carvalho de Melo
2017-04-01  2:10   ` Arnaldo Carvalho de Melo
2017-04-01  2:10 ` [PATCH 7/9] tools include uapi: Grab copies of stat.h and fcntl.h Arnaldo Carvalho de Melo
2017-04-01  2:11 ` [PATCH 8/9] perf tools: Do not fail in case of empty HOME env variable Arnaldo Carvalho de Melo
2017-04-01  2:11 ` [PATCH 9/9] perf trace: Beautify statx syscall 'flag' and 'mask' arguments Arnaldo Carvalho de Melo
2017-04-01 10:44 ` [GIT PULL 0/9] perf/core improvements and fixes Ingo Molnar
2017-04-01 10:44   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170401021101.10198-3-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexis.berlemont@gmail.com \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.