From: Andrey Vagin <avagin@openvz.org>
To: Arun Sharma <asharma@fb.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andrew Vagin <avagin@openvz.org>,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: Re: [PATCH 3/4] trace: add ability to collect call chain of non-current task.
Date: Fri, 09 Dec 2011 15:07:55 +0400 [thread overview]
Message-ID: <4EE1EC0B.4020600@openvz.org> (raw)
In-Reply-To: <4EE01ACB.1000102@fb.com>
Hello Arun,
>
> Agreed on remote callchains and maintaining consistency about what the
> tracepoints mean.
>
> As I said on the other thread, post-processing in userspace has the
> issue that we collect more info than we actually need and under load,
> perf record can't keep up.
>
> Attached is an alternative approach that does what you allude to above.
* Your method doesn't work for rt scheduler.
* It doesn't distinguish blocking time and sleeping time.
* This patch does a bit mess between subsystems...
Yes, this method may have the right to life. Could you correct this
patch and send it in lkml as a separate mail?
>
> perf record -agPe sched:sched_switch --filter "delay > 1000000" -- sleep 1
Why do you need the option "-a" ?
>
> allows us to collect a lot less. For some reason, "perf script" shows
> the correct delay field, but the sample period still contains 1 (i.e
> __perf_count() hint is not working for me).
Which kernel do you use? Does it contain "[PATCH] event: don't divide
events if it has field period"? It works fine with my kernel...
>
> -Arun
> +#ifdef CONFIG_SCHEDSTATS
> + __entry->delay = next->se.statistics.block_start ? next->se.statistics.block_start
> + : next->se.statistics.sleep_start ? next->se.statistics.sleep_start : 0;
The previous code is hard to read...
> + __entry->delay = __entry->delay ? now - __entry->delay : 0;
> +#else
> + __entry->delay = 0;
> +#endif
next->se.statistics.{block,sleep}_start should be zeroized here,
otherwise a next sched_switch will report non-zero delay again.
> + )
next prev parent reply other threads:[~2011-12-09 11:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 15:55 [PATCH 0/4] trace: add ability to collect call chains of non-current task Andrew Vagin
2011-09-26 15:55 ` [PATCH 1/4] perf: fix counter of ftrace events Andrew Vagin
2011-10-14 19:11 ` Arun Sharma
2011-09-26 15:55 ` [PATCH 2/4] trace: prepare to collect call chains of non-current task Andrew Vagin
2011-09-27 14:02 ` Peter Zijlstra
2011-10-14 19:12 ` Arun Sharma
2011-09-26 15:55 ` [PATCH 3/4] trace: add ability to collect call chain " Andrew Vagin
2011-09-27 14:05 ` Peter Zijlstra
2011-09-27 20:55 ` Frederic Weisbecker
2011-09-28 13:53 ` Andrew Vagin
2011-12-08 2:02 ` Arun Sharma
2011-12-09 11:07 ` Andrey Vagin [this message]
2011-12-14 20:14 ` Arun Sharma
2011-12-15 15:19 ` Andrew Vagin
2011-12-15 19:08 ` Arun Sharma
2011-12-16 0:15 ` Arun Sharma
2011-09-26 15:55 ` [PATCH 4/4] events: sched_stat_template saves call chains of a target task Andrew Vagin
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=4EE1EC0B.4020600@openvz.org \
--to=avagin@openvz.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=asharma@fb.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.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).