From: Namhyung Kim <namhyung@kernel.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: "Arnaldo Carvalho de Melo" <acme@kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Clark Williams" <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Adrian Hunter" <adrian.hunter@intel.com>,
"David Ahern" <dsahern@gmail.com>,
"Jin Yao" <yao.jin@linux.intel.com>,
"Jiri Olsa" <jolsa@kernel.org>, "Martin Liška" <mliska@suse.cz>,
"Ravi Bangoria" <ravi.bangoria@linux.vnet.ibm.com>,
"Thomas Richter" <tmricht@linux.vnet.ibm.com>,
"Wang Nan" <wangnan0@huawei.com>,
kernel-team@lge.com
Subject: Re: [PATCH 17/17] perf annotate: Handle variables in 'sub', 'or' and many other instructions
Date: Tue, 17 Apr 2018 11:56:28 +0900 [thread overview]
Message-ID: <20180417025628.GB31947@sejong> (raw)
In-Reply-To: <20180413173940.GE6694@tassilo.jf.intel.com>
Hi,
On Fri, Apr 13, 2018 at 10:39:40AM -0700, Andi Kleen wrote:
> > What do I miss? Or where is it that I'm misinterpreting the calculations
> > that objdump did in its output?
>
> The calculations are right, but these are still two different address modes.
> You cannot just turn one silently into the other.
>
> I think it would be ok to use the syntax in the assembler
>
> symbol(%rip) with no # ...
One thing I find useful is to show string constant if the address is
in the rodata (and printable of course). Maybe something like below..
lea 0x1234(%rip),%rdi # "hello world\n"
callq printf
Just an idea.
Thanks,
Namhyung
>
> > About something mildly related: what do you think about this:
> > http://ref.x86asm.net/, there is a xml file there[1] I'm thinking about
> > using, if available on the developer's HOME or some other standard place,
> > to provide help about the instructions :-)
>
> I don't know how well it's going to be maintained. x86 changes a lot
> and I've seen a lot of disassembler libraries etc. go stale as the
> owner cannot keep up.
>
> The only semi official maintained descriptions are the XED tables (but those
> don't have descriptions) or the PDFs from Intel/AMD.
> I suppose could have some hack that talks to a PDF reader and automatically
> downloads/searches the PDF.
>
> If unofficial is ok I would rather port some functionality
> from https://github.com/HJLebbink/asm-dude
> which has a lot of cool stuff.
>
> -Andi
next prev parent reply other threads:[~2018-04-17 2:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180413140111.25313-1-acme@kernel.org>
2018-04-13 14:00 ` [PATCH 01/17] perf stat: Enable 1ms interval for printing event counters values Arnaldo Carvalho de Melo
2018-04-13 14:00 ` [PATCH 02/17] tools headers: Restore READ_ONCE() C++ compatibility Arnaldo Carvalho de Melo
2018-04-13 14:00 ` [PATCH 03/17] perf tests: Run dwarf unwind test on arm32 Arnaldo Carvalho de Melo
2018-04-13 14:00 ` [PATCH 04/17] perf annotate: Allow showing offsets in more than just jump targets Arnaldo Carvalho de Melo
2018-04-13 14:00 ` [PATCH 05/17] perf annotate browser: " Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 06/17] perf jvmti: Give hints about package names needed to build Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 07/17] perf tests bpf: Remove unused ptrace.h include from LLVM test Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 08/17] Revert "x86/asm: Allow again using asm.h when building for the 'bpf' clang target" Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 10/17] perf tools: Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 11/17] perf version: Print status for syscall_table Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 12/17] perf sched: Fix documentation for timehist Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 13/17] perf tests: Disable breakpoint accounting test for powerpc Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 14/17] perf record: Change warning for missing sysfs entry to debug Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 15/17] perf report: Fix switching to another perf.data file Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 16/17] perf annotate: Allow setting the offset level in .perfconfig Arnaldo Carvalho de Melo
2018-04-13 14:01 ` [PATCH 17/17] perf annotate: Handle variables in 'sub', 'or' and many other instructions Arnaldo Carvalho de Melo
2018-04-13 16:20 ` Andi Kleen
2018-04-13 17:20 ` Arnaldo Carvalho de Melo
2018-04-13 17:39 ` Andi Kleen
2018-04-17 2:56 ` Namhyung Kim [this message]
2018-04-17 12:51 ` Arnaldo Carvalho de Melo
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=20180417025628.GB31947@sejong \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mliska@suse.cz \
--cc=ravi.bangoria@linux.vnet.ibm.com \
--cc=tmricht@linux.vnet.ibm.com \
--cc=wangnan0@huawei.com \
--cc=williams@redhat.com \
--cc=yao.jin@linux.intel.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 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 NNTP newsgroup(s).