From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Luming Yu <luming.yu@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, 2nddept-manager@sdl.hitachi.co.jp
Subject: Re: Is it supported to perf probe data?
Date: Tue, 21 Sep 2010 13:32:17 +0900 [thread overview]
Message-ID: <4C983551.5060700@hitachi.com> (raw)
In-Reply-To: <AANLkTinuDWweEt80Kchwzx3B5yeVA5SaFHxJyv9d9pao@mail.gmail.com>
(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
prev parent reply other threads:[~2010-09-21 4:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=4C983551.5060700@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=2nddept-manager@sdl.hitachi.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=luming.yu@gmail.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