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


Groups > linux.kernel > #1441034 > unrolled thread

Re: [PATCH v3 3/4] perf annotate: add powerpc support

Started byRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
First post2016-07-12 04:30 +0200
Last post2016-07-13 11:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 3/4] perf annotate: add powerpc support Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-07-12 04:30 +0200
    Re: [PATCH v3 3/4] perf annotate: add powerpc support Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-12 04:40 +0200
      Re: [PATCH v3 3/4] perf annotate: add powerpc support Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-07-13 11:40 +0200

#1441034 — Re: [PATCH v3 3/4] perf annotate: add powerpc support

FromRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Date2016-07-12 04:30 +0200
SubjectRe: [PATCH v3 3/4] perf annotate: add powerpc support
Message-ID<rTVCq-79h-19@gated-at.bofh.it>
Hi Arnaldo,

On Friday 08 July 2016 02:01 PM, Michael Ellerman wrote:
> Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> writes:
>
>> On Wednesday 06 July 2016 03:38 PM, Michael Ellerman wrote:
>>
>> I've sent v4 which enables annotate for bctr' instructions.
>>
>> for 'bctr', it will show down arrow(indicate jump) and 'bctrl' will show
>> right arrow(indicate call). But no navigation options will be provided.
>> By pressing Enter key on that, message will be shown that like
>> "Invalid target"
> Great thanks.

I've sent v4 series. Please review it.

-Ravi

>>>>> It doesn't look like we have the opcode handy here? Could we get it somehow?
>>>>> That would make this a *lot* more robust.
>>>> objdump prints machine code, but I don't know how difficult that would
>>>> be to parse to get opcode.
>>> Normal objdump -d output includes the opcode, eg:
>>>
>>> c00000000000886c:       2c 2c 00 00     cmpdi   r12,0
>>>                           ^^^^^^^^^^^
>>>
>>> The only thing you need to know is the endian and you can reconstruct
>>> the raw instruction.
>>>
>>> Then you can just decode the opcode, see how we do it in the kernel with
>>> eg. instr_is_relative_branch().
>> I'm sorry. I was thinking that you wants to show opcodes with perf
>> annotate. But you were asking to use opcode instead of parsing
>> instructions.
> Yeah.
>
>> This looks like rewrite parsing code. I don't know whether there is any
>> library already available for this which we can directly use. I'm thinking
>> about this.
> OK don't worry about it for now. We should get this merged for starters
> and we can always improve it later.
>
> cheers
>

[toc] | [next] | [standalone]


#1441035

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-07-12 04:40 +0200
Message-ID<rTVM6-7cf-5@gated-at.bofh.it>
In reply to#1441034
Em Tue, Jul 12, 2016 at 07:51:46AM +0530, Ravi Bangoria escreveu:
> Hi Arnaldo,
> 
> On Friday 08 July 2016 02:01 PM, Michael Ellerman wrote:
> > Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> writes:
> > 
> > > On Wednesday 06 July 2016 03:38 PM, Michael Ellerman wrote:
> > > 
> > > I've sent v4 which enables annotate for bctr' instructions.
> > > 
> > > for 'bctr', it will show down arrow(indicate jump) and 'bctrl' will show
> > > right arrow(indicate call). But no navigation options will be provided.
> > > By pressing Enter key on that, message will be shown that like
> > > "Invalid target"
> > Great thanks.
> 
> I've sent v4 series. Please review it.

If somebody else could do it and provide acks/reviewed by, that would
help,

Michael, can I get your comments as such?

Thanks,

- Arnaldo
 
> -Ravi
> 
> > > > > > It doesn't look like we have the opcode handy here? Could we get it somehow?
> > > > > > That would make this a *lot* more robust.
> > > > > objdump prints machine code, but I don't know how difficult that would
> > > > > be to parse to get opcode.
> > > > Normal objdump -d output includes the opcode, eg:
> > > > 
> > > > c00000000000886c:       2c 2c 00 00     cmpdi   r12,0
> > > >                           ^^^^^^^^^^^
> > > > 
> > > > The only thing you need to know is the endian and you can reconstruct
> > > > the raw instruction.
> > > > 
> > > > Then you can just decode the opcode, see how we do it in the kernel with
> > > > eg. instr_is_relative_branch().
> > > I'm sorry. I was thinking that you wants to show opcodes with perf
> > > annotate. But you were asking to use opcode instead of parsing
> > > instructions.
> > Yeah.
> > 
> > > This looks like rewrite parsing code. I don't know whether there is any
> > > library already available for this which we can directly use. I'm thinking
> > > about this.
> > OK don't worry about it for now. We should get this merged for starters
> > and we can always improve it later.
> > 
> > cheers
> > 

[toc] | [prev] | [next] | [standalone]


#1442265

FromRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Date2016-07-13 11:40 +0200
Message-ID<rUoO6-17A-23@gated-at.bofh.it>
In reply to#1441035

On Wednesday 13 July 2016 01:09 PM, Michael Ellerman wrote:
> Arnaldo Carvalho de Melo <acme@kernel.org> writes:
>
>> Em Tue, Jul 12, 2016 at 07:51:46AM +0530, Ravi Bangoria escreveu:
>>> Hi Arnaldo,
>>>
>>> On Friday 08 July 2016 02:01 PM, Michael Ellerman wrote:
>>>> Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> writes:
>>>>
>>>>> On Wednesday 06 July 2016 03:38 PM, Michael Ellerman wrote:
>>>>>
>>>>> I've sent v4 which enables annotate for bctr' instructions.
>>>>>
>>>>> for 'bctr', it will show down arrow(indicate jump) and 'bctrl' will show
>>>>> right arrow(indicate call). But no navigation options will be provided.
>>>>> By pressing Enter key on that, message will be shown that like
>>>>> "Invalid target"
>>>> Great thanks.
>>> I've sent v4 series. Please review it.
>> If somebody else could do it and provide acks/reviewed by, that would
>> help,
>>
>> Michael, can I get your comments as such?
> It looks OK to me. But I don't know the code really, and I haven't had
> time to test it personally.
>
> Ravi, have you tested on a big endian machine?

Yes Michael, I've tested annotate on BE and LE both.

-Ravi

>
> cheers
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web