public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yunlong Song <yunlong.song@huawei.com>
To: David Ahern <dsahern@gmail.com>, <a.p.zijlstra@chello.nl>,
	<paulus@samba.org>, <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: <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: Wed, 6 May 2015 12:10:04 +0800	[thread overview]
Message-ID: <5549941C.6040901@huawei.com> (raw)
In-Reply-To: <553BB895.20800@gmail.com>

On 2015/4/25 23:53, David Ahern wrote:
> On 4/25/15 8:05 AM, Yunlong Song wrote:
>> On 2015/4/24 21:58, David Ahern wrote:
>>> On 4/24/15 7:31 AM, Yunlong Song wrote:
>>>> Now we are profiling the performance of ext4 and f2fs on an eMMC card with iozone,
>>>> we find a case that ext4 is better than f2fs in random write under the test of
>>>> "iozone -s 262144 -r 64 -i 0 -i 2". We want to analyze the I/O delay of the two
>>>> file systems. We have got a conclusion that 1% of sys_write takes up 60% time of
>>>> the overall sys_write (262144/64=4096). We want to find out the call stack during
>>>> this specific 1% sys_write. Our idea is to record the stack in a certain time period
>>>> and since the specific 1% case takes up 60% time, the total number of records of its
>>>> stack should also takes up 60% of the total records, then we can recognize those stacks
>>>> and figure out what the I/O stack of f2fs is doing in the 1% case.
>>>
>>> And to address this specific profiling problem have you tried:
>>>
>>>     perf trace record -- iozone ...
>>>     perf trace -i perf.data -S
>>>
>>>
>>>
>>>
>>
>> But this only shows the system call like strace, but we want the call stack of kernel functions
>> in fact.
>>
> 
> We haven't added the callchain option yet; on the to-do list.
> 
> perf trace record -g -- iozone ...
> perf trace -i perf.data -s
> --> summary of system calls, max/min/average times
> 
> perf trace -i perf.data --duration 10.0 -T
> --> note the timestamp where the write took a "long" time
> 
> perf script
> --> search down to *around* the time of interest; you want the syscall entry; timestamp is for exit
> 
> .
> 

Hi, David,

It's almost what we want, we are eager to see it can work as a callchain option, since it's really a useful
tool in analyzing latency of I/O performance in production case.

-- 
Thanks,
Yunlong Song


      parent reply	other threads:[~2015-05-06  4:10 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
2015-05-06  4:13         ` Yunlong Song
2015-05-06  4:10       ` Yunlong Song [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=5549941C.6040901@huawei.com \
    --to=yunlong.song@huawei.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=wangnan0@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox