Skip to contentSkip to conversation

Does perf support different length of user-space hw_breakpoint?

DISCUSSION xiakaixu 4 participants 8 messages May 12, 2014 – May 14, 2014 1 message not in the archive

lore
Share & tools
lore

xiakaixu

author
#0 lore raw

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

#1 lore raw
Quoted 11 lines · xiakaixu

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?

A message that is not in the archive (sent off-list or not yet received): CAGjdHukwC3cu3YOSSteXsC4_52m-YTdAAYCfXV+q5A2pnW+CKQ@mail.gmail.com

#3 lore raw
Quoted 12 lines · kaixu xia

2014-05-12 16:05 GMT+08:00 Peter Zijlstra <[email protected]>:

Quoted 10 lines · xiakaixu
Quoted 9 lines

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.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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

author
#4 lore raw
Quoted 16 lines · Peter Zijlstra
Quoted 15 lines · kaixu xia

2014-05-12 16:05 GMT+08:00 Peter Zijlstra <[email protected]>:

Quoted 13 lines · xiakaixu
Quoted 11 lines

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?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Frederic?

Sorry, can not fully understand it. Can you give more details on that?

I asked Frederic to answer your question :-)

Thanks:-)

author
#5 lore raw

ping....

Quoted 31 lines · xiakaixu
Quoted 16 lines · Peter Zijlstra
Quoted 15 lines · kaixu xia

2014-05-12 16:05 GMT+08:00 Peter Zijlstra <[email protected]>:

Quoted 13 lines · xiakaixu
Quoted 11 lines

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?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to xiakaixu
Quoted 8 lines · xiakaixu

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;
Quoted 3 lines

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

#7 lore raw
Quoted 22 lines · Jiri Olsa
Quoted 8 lines · xiakaixu

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;
Quoted 1 line
Quoted 4 lines
Quoted 2 lines

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.

author
#8 lore raw
Quoted 23 lines · Frederic Weisbecker
Quoted 22 lines · Jiri Olsa
Quoted 8 lines · xiakaixu

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;
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

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.

Quoted 2 lines

.