linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 18:47:11 -0600	[thread overview]
Message-ID: <4DB0D00F.3040706@gmail.com> (raw)
In-Reply-To: <BANLkTimZA6YA07d8hNKuxhoySvHpTmWjvw@mail.gmail.com>

On 04/21/11 14:07, Francis Moreau wrote:
> On Thu, Apr 21, 2011 at 9:49 PM, David Ahern <dsahern@gmail.com> wrote:
>>
>> You want the individual samples? if so, perf script dumps them and you
>> can see the callchain for each sys_read.
>>
> 
> hmm, I don't see what you mean by individual samples.
> 
> I don't think sampling can help in my case (tracing the callchain of
> one syscall).
> 
> Could you give me an example of what you have in mind ?
> 
> Thanks

I think I get it now. 'perf record' for syscall event stops at sys_read
as that is the point the event is generated. You want where the kernel
goes starting with sys_read. In that case you are limited to the
pre-existing tracepoints (see 'perf list -e tracepoints') to trigger an
event and back trace, or if the read causes the processes to block you
can you use the context-switch event or sched_switch trace point.

You could also insert probe points using perf probe. Lin Ming posted an
example of this a couple of weeks ago:
# ./perf probe -k ~/vmlinux -s ~/linux-2.6/  find_get_page
# ./perf record -e probe:find_get_page -f -g -a

David

  reply	other threads:[~2011-04-22  0:47 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
2011-04-21 20:07       ` Francis Moreau
2011-04-22  0:47         ` David Ahern [this message]
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=4DB0D00F.3040706@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).