* Is it supported to perf probe data?
@ 2010-09-20 8:03 Luming Yu
2010-09-20 23:54 ` Masami Hiramatsu
0 siblings, 1 reply; 4+ messages in thread
From: Luming Yu @ 2010-09-20 8:03 UTC (permalink / raw)
To: LKML; +Cc: masami.hiramatsu
Hi there,
I need to analyze accessing pattern to a data in kernel. Wanna to
check with you if perf probe can help to get that trace.
Thanks,
Luming
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it supported to perf probe data?
2010-09-20 8:03 Is it supported to perf probe data? Luming Yu
@ 2010-09-20 23:54 ` Masami Hiramatsu
2010-09-21 1:19 ` Luming Yu
0 siblings, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2010-09-20 23:54 UTC (permalink / raw)
To: Luming Yu; +Cc: LKML, 2nddept-manager
Hi Luming,
(2010/09/20 17:03), Luming Yu wrote:
> Hi there,
>
> I need to analyze accessing pattern to a data in kernel. Wanna to
> check with you if perf probe can help to get that trace.
Yes, perf probe can add new trace events which can be used
from perf record/report/trace or ftrace as same as other pre-defined
trace events. Those new events can record variables as arguments too.
So you can define new events with accessed data, record it by perf record,
and see it by perf trace.
Thank you,
--
Masami HIRAMATSU
2nd Dept. Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it supported to perf probe data?
2010-09-20 23:54 ` Masami Hiramatsu
@ 2010-09-21 1:19 ` Luming Yu
2010-09-21 4:32 ` Masami Hiramatsu
0 siblings, 1 reply; 4+ messages in thread
From: Luming Yu @ 2010-09-21 1:19 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: LKML, 2nddept-manager
On Tue, Sep 21, 2010 at 7:54 AM, Masami Hiramatsu
<masami.hiramatsu.pt@hitachi.com> wrote:
> Hi Luming,
>
> (2010/09/20 17:03), Luming Yu wrote:
>> Hi there,
>>
>> I need to analyze accessing pattern to a data in kernel. Wanna to
>> check with you if perf probe can help to get that trace.
>
> Yes, perf probe can add new trace events which can be used
> from perf record/report/trace or ftrace as same as other pre-defined
> trace events. Those new events can record variables as arguments too.
> So you can define new events with accessed data, record it by perf record,
> and see it by perf trace.
e.g. I need to trace accessing to thread_info.flags of a specific task,
would you please show me an example how to do it.
Thanks,
Luming
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it supported to perf probe data?
2010-09-21 1:19 ` Luming Yu
@ 2010-09-21 4:32 ` Masami Hiramatsu
0 siblings, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2010-09-21 4:32 UTC (permalink / raw)
To: Luming Yu; +Cc: LKML, 2nddept-manager
(2010/09/21 10:19), Luming Yu wrote:
> On Tue, Sep 21, 2010 at 7:54 AM, Masami Hiramatsu
> <masami.hiramatsu.pt@hitachi.com> wrote:
>> Hi Luming,
>>
>> (2010/09/20 17:03), Luming Yu wrote:
>>> Hi there,
>>>
>>> I need to analyze accessing pattern to a data in kernel. Wanna to
>>> check with you if perf probe can help to get that trace.
>>
>> Yes, perf probe can add new trace events which can be used
>> from perf record/report/trace or ftrace as same as other pre-defined
>> trace events. Those new events can record variables as arguments too.
>> So you can define new events with accessed data, record it by perf record,
>> and see it by perf trace.
>
> e.g. I need to trace accessing to thread_info.flags of a specific task,
> would you please show me an example how to do it.
OK, if your tracing function 'func' has a local pointer 'thread_info' which points
to the thread_info structure, you can do;
# perf probe --add 'func thread_info->flags'
to trace flags.
But if you are willing to trace (struct *thread_info)(current->stack)->flags,
sorry, currently perf probe doesn't support (1)"current" special macro, and
(2)force type casting.
If you need that kind of complicated tracing ASAP, I'd like to recommend
you to use systemtap. (which I'm trying to catch up...)
Thank you,
>
> Thanks,
> Luming
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Masami HIRAMATSU
2nd Dept. Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-21 4:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 8:03 Is it supported to perf probe data? Luming Yu
2010-09-20 23:54 ` Masami Hiramatsu
2010-09-21 1:19 ` Luming Yu
2010-09-21 4:32 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox