All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Rabin Vincent <rabin@rab.in>, Yunlong Song <yunlong.song@huawei.com>
Cc: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel@vger.kernel.org, wangnan0@huawei.com
Subject: Re: [Question] How does perf still record the stack of a specified pid even when that process is interrupted and CPU is scheduled to other process
Date: Tue, 05 May 2015 16:24:54 -0600	[thread overview]
Message-ID: <55494336.4060709@gmail.com> (raw)
In-Reply-To: <20150505215328.GA3397@debian>

On 5/5/15 3:53 PM, Rabin Vincent wrote:
> The commands above will identify the sys_write which takes time but only
> provide the stacktrace at the entry and exit of the syscall, but this do
> not show why the process blocked or what it did inside the system call.
>
> So a way to get what is required for the use case would be to make the
> following changes to the above sequence:
>
> (1) include the sched:* events when perf trace record is run
>
> (2) around the time of interest, look at the kernel stack st the sched:switch
>      events between the entry and the exit.  This will show what the process was
>      waiting for when it when it blocked.  The stacktraces at the
>      stat_runtime events in the process may also be useful to understand what
>      was going on.

agreed.



  reply	other threads:[~2015-05-05 22:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 13:31 [Question] How does perf still record the stack of a specified pid even when that process is interrupted and CPU is scheduled to other process Yunlong Song
2015-04-24 13:49 ` Yunlong Song
2015-04-25 14:03   ` Yunlong Song
2015-04-24 13:49 ` David Ahern
2015-04-24 13:56   ` Yunlong Song
2015-04-24 13:58 ` David Ahern
2015-04-25 14:05   ` Yunlong Song
2015-04-25 15:53     ` David Ahern
2015-05-05 21:53       ` Rabin Vincent
2015-05-05 22:24         ` David Ahern [this message]
2015-05-06  4:13         ` Yunlong Song
2015-05-06  4:10       ` Yunlong Song

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=55494336.4060709@gmail.com \
    --to=dsahern@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=rabin@rab.in \
    --cc=wangnan0@huawei.com \
    --cc=yunlong.song@huawei.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.