From: Jiri Olsa <jolsa@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>,
Jiri Olsa <jolsa@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-perf-use." <linux-perf-users@vger.kernel.org>
Subject: Re: Question to perf annotate handling mov ...(%rip) instructions
Date: Wed, 29 Nov 2017 09:29:50 +0100 [thread overview]
Message-ID: <20171129082950.GA26610@krava> (raw)
In-Reply-To: <20171128145030.GG3298@kernel.org>
On Tue, Nov 28, 2017 at 11:50:30AM -0300, Arnaldo Carvalho de Melo wrote:
SNIP
> > Function mov__parse() calls comment__symbol() which contains:
> >
> > static int comment__symbol(char *raw, char *comment, u64 *addrp, char **namep)
> > {
> > char *endptr, *name, *t;
> >
> > if (strstr(raw, "(%rip)") == NULL)
> > return 0;
> >
> > This is architecture specific and does not work for non-Intel platforms.
> >
> > I would like to fix perf annotate for s390x and above move instruction on s390x
> > is
> >
> > 655a: c0 10 00 01 9c eb larl %r1,39f30 <__gmon_start__>
> >
> > There is a need to handle PLT resolution in an architecture independent way.
> >
> > Ideas and suggestions?
>
> Some historical background there, busy now, but you seem to be on the
> right track and IIRC you already sent a patch for this, right? I'll try
> to look at it.
>
> Jiri may as well, since he worked a lot recently in this codebase, to
> refactor it some more to make it useful for annotating python code, perl
> next, other scripted languages should follow too.
so we try to parse each line out of objdump using arch specific
ops callbacks, check:
disasm_line__new
disasm_line__init_ins
dl->ins.ops->parse(...
the ops stuff are defined in:
static struct arch architectures[] = {
{
.name = "s390",
.init = s390__annotate_init,
.objdump = {
.comment_char = '#',
},
},
I'd check s390__annotate_init, there's some mechanism
of associating ops for arch and try to fit in ;-)
jirka
next prev parent reply other threads:[~2017-11-29 8:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 10:42 Question to perf annotate handling mov ...(%rip) instructions Thomas-Mich Richter
2017-11-28 14:50 ` Arnaldo Carvalho de Melo
2017-11-29 8:29 ` Jiri Olsa [this message]
2017-11-29 9:26 ` Thomas-Mich Richter
2017-11-29 9:14 ` Thomas-Mich Richter
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=20171129082950.GA26610@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=tmricht@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 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).