linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Does perf support different length of user-space hw_breakpoint?
@ 2014-05-12  7:52 xiakaixu
  2014-05-12  8:05 ` Peter Zijlstra
  2014-05-13 12:00 ` Jiri Olsa
  0 siblings, 2 replies; 8+ messages in thread
From: xiakaixu @ 2014-05-12  7:52 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users
  Cc: paulus, Ingo Molnar, a.p.zijlstra, Arnaldo Carvalho de Melo,
	Jiri Olsa, Borislav Petkov, Namhyung Kim, Huxinwei, peifeiyue

Hi guys,

Does perf support different length of user-space hw_breakpoint,
such as  HW_BREAKPOINT_LEN_1/HW_BREAKPOINT_LEN_2/HW_BREAKPOINT_LEN_4/
HW_BREAKPOINT_LEN_8?

Seems perf only support HW_BREAKPOINT_LEN_4/sizeof(long)
by default from the source code and simple test.

May I have your opinions if I want to trace different bytes of
hw_breakpoint addr?

Thanks,

Xia Kaixu

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Does perf support different length of user-space hw_breakpoint?
  2014-05-12  7:52 Does perf support different length of user-space hw_breakpoint? xiakaixu
@ 2014-05-12  8:05 ` Peter Zijlstra
       [not found]   ` <CAGjdHukwC3cu3YOSSteXsC4_52m-YTdAAYCfXV+q5A2pnW+CKQ@mail.gmail.com>
  2014-05-13 12:00 ` Jiri Olsa
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Zijlstra @ 2014-05-12  8:05 UTC (permalink / raw)
  To: xiakaixu
  Cc: linux-kernel, linux-perf-users, paulus, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Borislav Petkov,
	Namhyung Kim, Huxinwei, peifeiyue, fweisbec

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

On Mon, May 12, 2014 at 03:52:54PM +0800, xiakaixu wrote:
> Hi guys,
> 
> Does perf support different length of user-space hw_breakpoint,
> such as  HW_BREAKPOINT_LEN_1/HW_BREAKPOINT_LEN_2/HW_BREAKPOINT_LEN_4/
> HW_BREAKPOINT_LEN_8?
> 
> Seems perf only support HW_BREAKPOINT_LEN_4/sizeof(long)
> by default from the source code and simple test.
> 
> May I have your opinions if I want to trace different bytes of
> hw_breakpoint addr?

Frederic?

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Does perf support different length of user-space hw_breakpoint?
       [not found]   ` <CAGjdHukwC3cu3YOSSteXsC4_52m-YTdAAYCfXV+q5A2pnW+CKQ@mail.gmail.com>
@ 2014-05-12  8:48     ` Peter Zijlstra
  2014-05-12  9:00       ` xiakaixu
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Zijlstra @ 2014-05-12  8:48 UTC (permalink / raw)
  To: kaixu xia
  Cc: xiakaixu, linux-kernel, linux-perf-users, paulus, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Borislav Petkov,
	Namhyung Kim, Huxinwei, peifeiyue, fweisbec

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

On Mon, May 12, 2014 at 04:20:44PM +0800, kaixu xia wrote:
> 2014-05-12 16:05 GMT+08:00 Peter Zijlstra <peterz@infradead.org>:
> 
> > On Mon, May 12, 2014 at 03:52:54PM +0800, xiakaixu wrote:
> > > Hi guys,
> > >
> > > Does perf support different length of user-space hw_breakpoint,
> > > such as  HW_BREAKPOINT_LEN_1/HW_BREAKPOINT_LEN_2/HW_BREAKPOINT_LEN_4/
> > > HW_BREAKPOINT_LEN_8?
> > >
> > > Seems perf only support HW_BREAKPOINT_LEN_4/sizeof(long)
> > > by default from the source code and simple test.
> > >
> > > May I have your opinions if I want to trace different bytes of
> > > hw_breakpoint addr?
> >
> > Frederic?
> >
> 
> Sorry, can not fully understand it. Can you give more details on that?

I asked Frederic to answer your question :-)

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Does perf support different length of user-space hw_breakpoint?
  2014-05-12  8:48     ` Peter Zijlstra
@ 2014-05-12  9:00       ` xiakaixu
  2014-05-13 11:38         ` xiakaixu
  0 siblings, 1 reply; 8+ messages in thread
From: xiakaixu @ 2014-05-12  9:00 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: kaixu xia, linux-kernel, linux-perf-users, paulus, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Borislav Petkov,
	Namhyung Kim, Huxinwei, peifeiyue, fweisbec

于 2014/5/12 16:48, Peter Zijlstra 写道:
> On Mon, May 12, 2014 at 04:20:44PM +0800, kaixu xia wrote:
>> 2014-05-12 16:05 GMT+08:00 Peter Zijlstra <peterz@infradead.org>:
>>
>>> On Mon, May 12, 2014 at 03:52:54PM +0800, xiakaixu wrote:
>>>> Hi guys,
>>>>
>>>> Does perf support different length of user-space hw_breakpoint,
>>>> such as  HW_BREAKPOINT_LEN_1/HW_BREAKPOINT_LEN_2/HW_BREAKPOINT_LEN_4/
>>>> HW_BREAKPOINT_LEN_8?
>>>>
>>>> Seems perf only support HW_BREAKPOINT_LEN_4/sizeof(long)
>>>> by default from the source code and simple test.
>>>>
>>>> May I have your opinions if I want to trace different bytes of
>>>> hw_breakpoint addr?
>>>
>>> Frederic?
>>>
>>
>> Sorry, can not fully understand it. Can you give more details on that?
> 
> I asked Frederic to answer your question :-)
> 
Thanks:-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Does perf support different length of user-space hw_breakpoint?
  2014-05-12  9:00       ` xiakaixu
@ 2014-05-13 11:38         ` xiakaixu
  0 siblings, 0 replies; 8+ messages in thread
From: xiakaixu @ 2014-05-13 11:38 UTC (permalink / raw)
  To: Peter Zijlstra, fweisbec
  Cc: kaixu xia, linux-kernel, linux-perf-users, paulus, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Borislav Petkov,
	Namhyung Kim, Huxinwei, peifeiyue

ping....
于 2014/5/12 17:00, xiakaixu 写道:
> 于 2014/5/12 16:48, Peter Zijlstra 写道:
>> On Mon, May 12, 2014 at 04:20:44PM +0800, kaixu xia wrote:
>>> 2014-05-12 16:05 GMT+08:00 Peter Zijlstra <peterz@infradead.org>:
>>>
>>>> On Mon, May 12, 2014 at 03:52:54PM +0800, xiakaixu wrote:
>>>>> Hi guys,
>>>>>
>>>>> Does perf support different length of user-space hw_breakpoint,
>>>>> such as  HW_BREAKPOINT_LEN_1/HW_BREAKPOINT_LEN_2/HW_BREAKPOINT_LEN_4/
>>>>> HW_BREAKPOINT_LEN_8?
>>>>>
>>>>> Seems perf only support HW_BREAKPOINT_LEN_4/sizeof(long)
>>>>> by default from the source code and simple test.
>>>>>
>>>>> May I have your opinions if I want to trace different bytes of
>>>>> hw_breakpoint addr?
>>>>
>>>> Frederic?
>>>>
>>>
>>> Sorry, can not fully understand it. Can you give more details on that?
>>
>> I asked Frederic to answer your question :-)
>>
> Thanks:-)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Does perf support different length of user-space hw_breakpoint?
  2014-05-12  7:52 Does perf support different length of user-space hw_breakpoint? xiakaixu
  2014-05-12  8:05 ` Peter Zijlstra
@ 2014-05-13 12:00 ` Jiri Olsa
  2014-05-13 15:06   ` Frederic Weisbecker
  1 sibling, 1 reply; 8+ messages in thread
From: Jiri Olsa @ 2014-05-13 12:00 UTC (permalink / raw)
  To: xiakaixu
  Cc: linux-kernel, linux-perf-users, paulus, Ingo Molnar, a.p.zijlstra,
	Arnaldo Carvalho de Melo, Borislav Petkov, Namhyung Kim, Huxinwei,
	peifeiyue, fweisbec

On Mon, May 12, 2014 at 03:52:54PM +0800, xiakaixu wrote:
> Hi guys,
> 
> Does perf support different length of user-space hw_breakpoint,
> such as  HW_BREAKPOINT_LEN_1/HW_BREAKPOINT_LEN_2/HW_BREAKPOINT_LEN_4/
> HW_BREAKPOINT_LEN_8?
> 
> Seems perf only support HW_BREAKPOINT_LEN_4/sizeof(long)
> by default from the source code and simple test.

right..

        /*
         * We should find a nice way to override the access length
         * Provide some defaults for now
         */
        if (attr.bp_type == HW_BREAKPOINT_X)
                attr.bp_len = sizeof(long);
        else
                attr.bp_len = HW_BREAKPOINT_LEN_4;

> 
> May I have your opinions if I want to trace different bytes of
> hw_breakpoint addr?

I guess that depends on what you want to do ;-)

jirka

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Does perf support different length of user-space hw_breakpoint?
  2014-05-13 12:00 ` Jiri Olsa
@ 2014-05-13 15:06   ` Frederic Weisbecker
  2014-05-14  2:55     ` xiakaixu
  0 siblings, 1 reply; 8+ messages in thread
From: Frederic Weisbecker @ 2014-05-13 15:06 UTC (permalink / raw)
  To: Jiri Olsa, Suravee Suthikulpanit
  Cc: xiakaixu, linux-kernel, linux-perf-users, paulus, Ingo Molnar,
	a.p.zijlstra, Arnaldo Carvalho de Melo, Borislav Petkov,
	Namhyung Kim, Huxinwei, peifeiyue

On Tue, May 13, 2014 at 02:00:46PM +0200, Jiri Olsa wrote:
> On Mon, May 12, 2014 at 03:52:54PM +0800, xiakaixu wrote:
> > Hi guys,
> > 
> > Does perf support different length of user-space hw_breakpoint,
> > such as  HW_BREAKPOINT_LEN_1/HW_BREAKPOINT_LEN_2/HW_BREAKPOINT_LEN_4/
> > HW_BREAKPOINT_LEN_8?
> > 
> > Seems perf only support HW_BREAKPOINT_LEN_4/sizeof(long)
> > by default from the source code and simple test.
> 
> right..
> 
>         /*
>          * We should find a nice way to override the access length
>          * Provide some defaults for now
>          */
>         if (attr.bp_type == HW_BREAKPOINT_X)
>                 attr.bp_len = sizeof(long);
>         else
>                 attr.bp_len = HW_BREAKPOINT_LEN_4;
> 
> > 
> > May I have your opinions if I want to trace different bytes of
> > hw_breakpoint addr?
> 
> I guess that depends on what you want to do ;-)

Ah, I have a patchset from Jacob Shin and Suravee Suthikulpanit that does
that. Also it has been hanging around for too long by my fault. I'm posting
it now.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Does perf support different length of user-space hw_breakpoint?
  2014-05-13 15:06   ` Frederic Weisbecker
@ 2014-05-14  2:55     ` xiakaixu
  0 siblings, 0 replies; 8+ messages in thread
From: xiakaixu @ 2014-05-14  2:55 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: Jiri Olsa, Suravee Suthikulpanit, linux-kernel, linux-perf-users,
	paulus, Ingo Molnar, a.p.zijlstra, Arnaldo Carvalho de Melo,
	Borislav Petkov, Namhyung Kim, Huxinwei, peifeiyue

于 2014/5/13 23:06, Frederic Weisbecker 写道:
> On Tue, May 13, 2014 at 02:00:46PM +0200, Jiri Olsa wrote:
>> On Mon, May 12, 2014 at 03:52:54PM +0800, xiakaixu wrote:
>>> Hi guys,
>>>
>>> Does perf support different length of user-space hw_breakpoint,
>>> such as  HW_BREAKPOINT_LEN_1/HW_BREAKPOINT_LEN_2/HW_BREAKPOINT_LEN_4/
>>> HW_BREAKPOINT_LEN_8?
>>>
>>> Seems perf only support HW_BREAKPOINT_LEN_4/sizeof(long)
>>> by default from the source code and simple test.
>>
>> right..
>>
>>         /*
>>          * We should find a nice way to override the access length
>>          * Provide some defaults for now
>>          */
>>         if (attr.bp_type == HW_BREAKPOINT_X)
>>                 attr.bp_len = sizeof(long);
>>         else
>>                 attr.bp_len = HW_BREAKPOINT_LEN_4;
>>
>>>
>>> May I have your opinions if I want to trace different bytes of
>>> hw_breakpoint addr?
>>
>> I guess that depends on what you want to do ;-)
> 
> Ah, I have a patchset from Jacob Shin and Suravee Suthikulpanit that does
> that. Also it has been hanging around for too long by my fault. I'm posting
> it now.

Thanks for your reply!
Hopefully I can get it ASAP.
> .
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-05-14  2:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12  7:52 Does perf support different length of user-space hw_breakpoint? xiakaixu
2014-05-12  8:05 ` Peter Zijlstra
     [not found]   ` <CAGjdHukwC3cu3YOSSteXsC4_52m-YTdAAYCfXV+q5A2pnW+CKQ@mail.gmail.com>
2014-05-12  8:48     ` Peter Zijlstra
2014-05-12  9:00       ` xiakaixu
2014-05-13 11:38         ` xiakaixu
2014-05-13 12:00 ` Jiri Olsa
2014-05-13 15:06   ` Frederic Weisbecker
2014-05-14  2:55     ` xiakaixu

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).