From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
lkml <linux-kernel@vger.kernel.org>,
2nddept-manager@sdl.hitachi.co.jp
Subject: Re: [PATCH] perf-probe: make "perf-probe -L <function>" display the absolute path and absolute line number
Date: Fri, 14 Jan 2011 19:08:11 +0900 [thread overview]
Message-ID: <4D30208B.7040902@hitachi.com> (raw)
In-Reply-To: <m3tyhb6eme.fsf@gmail.com>
(2011/01/14 18:03), Franck Bui-Huu wrote:
> Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> writes:
>
>> (2011/01/14 4:42), Franck Bui-Huu wrote:
>
> [...]
>
>>> Well, for consistency, I thought that the additional information
>>> (given inside angle brackets) should always be the same: a full path
>>> and an absolute line number which clearly identify which source file
>>> perf-probe is listing.
>>
>> No, that is NOT an additional information. That indicates from where
>> those lines are started
>
> But this indication is currently not enough, it's too ambiguous to be
> usefull:
>
> <schedule:10>
>
> there might be several 'schedule()' functions inside the kernel, also we
> don't know which kernel tree is used.
Right, so I didn't decline your idea itself.
I've just commented on the output format of the path information.
> BTW, if there're several 'do_something' functions defined inside the
> kernel, what is the behaviour of:
>
> $ perf probe do_something
>
> Does it set a probe to all 'do_something' functions ? I don't think it's
> documented.
If do_something is an inline function, it tries to find all
functions. If it (the first one) is a normal function, it
just stopped after finding the first one.
If someone wants to put a probe on the specific function,
he can add some additional path information, like
$ perf probe do_something@path/to/source.c
>> , and also gives you a hint how you can specify the actual probe
>> point. For example,
>>
>> $ perf probe -L schedule:10
>> <schedule:10>
>> 10 rq = cpu_rq(cpu);
>> 11 rcu_note_context_switch(cpu);
>> 12 prev = rq->curr;
>>
>> this indicates the lines started from 10th line of schedule(), and
>
> but I'm not sure it's really usefull since you've asked for it when
> invoking perf-probe so it seems to be redundant.
If you list the lines of enough long function, the output will be
passed to pager and it flushes out the command line.
In that case, user will see only below output.
</usr/src/debug/kernel-2.6.35.fc14/linux-2.6.35.x86_64/kernel/sched.c:3823>
10 rq = cpu_rq(cpu);
11 rcu_note_context_switch(cpu);
12 prev = rq->curr;
13 switch_count = &prev->nivcsw;
15 release_kernel_lock(prev);
Hmm, how can he find the probe point from this? :)
Yeah, I know user must know what he has given. However, I'd like to
show users what actually he has given.
Thanks,
--
Masami HIRAMATSU
2nd Dept. Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2011-01-14 10:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 10:20 [PATCH] perf-probe: make "perf-probe -L <function>" display the absolute path and absolute line number Franck Bui-Huu
2011-01-13 11:03 ` Masami Hiramatsu
2011-01-13 19:42 ` Franck Bui-Huu
2011-01-14 3:22 ` Masami Hiramatsu
2011-01-14 9:03 ` Franck Bui-Huu
2011-01-14 10:08 ` Masami Hiramatsu [this message]
2011-01-14 10:33 ` Masami Hiramatsu
2011-01-14 19:53 ` Franck Bui-Huu
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=4D30208B.7040902@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=2nddept-manager@sdl.hitachi.co.jp \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vagabon.xyz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.