From: David Ahern <dsahern@gmail.com>
To: Francis Moreau <francis.moro@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: how to get a kernel callgraph starting from a syscall
Date: Thu, 21 Apr 2011 13:49:47 -0600 [thread overview]
Message-ID: <4DB08A5B.3060706@gmail.com> (raw)
In-Reply-To: <BANLkTinvMLaL8vdDWiG5fDEEAXUNBsyrBQ@mail.gmail.com>
On 04/21/11 12:48, Francis Moreau wrote:
> On Thu, Apr 21, 2011 at 5:23 PM, David Ahern <dsahern@gmail.com> wrote:
>>
>>
>> On 04/21/11 01:46, Francis Moreau wrote:
>>> Hello,
>>>
>>> Sorry if the question is dumb but I'm a bit lost about this.
>>>
>>> I know that ftrace exists but I think that perf can do this too: I
>>> have a userspace application which is calling a libc C function (read)
>>> which ends up doing a sys_read.
>>>
>>> For the sys_read, I'd like to see what's happening in the kernel by
>>> displaying the call graph.
>>>
>>> Can perf do that ?
>>
>> Have you tried 'perf record -g'?
>>
>
> Well, I don't see how it can be done with perf record -g.
>
> Let's say I'm interested to see the path taken in the kernel when a
> process is calling sys_sleep:
>
> $ perf record -g sleep 1
>
> Then I can use:
>
> $ perf report -g
>
> But I don't see what I am asking for.
>
> What am I missing ?
You want the individual samples? if so, perf script dumps them and you
can see the callchain for each sys_read.
David
>
> Thanks
next prev parent reply other threads:[~2011-04-21 19:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 7:46 how to get a kernel callgraph starting from a syscall Francis Moreau
2011-04-21 15:23 ` David Ahern
2011-04-21 18:48 ` Francis Moreau
2011-04-21 19:49 ` David Ahern [this message]
2011-04-21 20:07 ` Francis Moreau
2011-04-22 0:47 ` David Ahern
2011-04-22 5:29 ` Francis Moreau
2011-04-22 11:46 ` Francis Moreau
2011-04-23 8:40 ` Stefan Hajnoczi
2011-04-23 9:01 ` Francis Moreau
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=4DB08A5B.3060706@gmail.com \
--to=dsahern@gmail.com \
--cc=francis.moro@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).