From: David Ahern <dsahern@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC/PATCH] perf sched: Implement 'perf sched runtime' command
Date: Tue, 25 Aug 2015 10:09:08 -0700 [thread overview]
Message-ID: <55DCA134.5090101@gmail.com> (raw)
In-Reply-To: <20150825080706.GA21465@danjae.kornet>
On 8/25/15 1:07 AM, Namhyung Kim wrote:
> Hi David,
>
> On Mon, Aug 24, 2015 at 11:19:44PM -0700, David Ahern wrote:
>> On 8/24/15 11:11 PM, Namhyung Kim wrote:
>>>
>>> +static int perf_sched__read_runtime_events(struct perf_sched *sched)
>>> +{
>>> + const struct perf_evsel_str_handler handlers[] = {
>>> + { "sched:sched_switch", process_sched_switch_event, },
>>> + { "sched:sched_stat_runtime", process_sched_runtime_event, },
>>> + { "sched:sched_stat_sleep", process_sched_sleep_event, },
>>> + { "sched:sched_stat_wait", process_sched_wait_event, },
>>> + { "sched:sched_stat_iowait", process_sched_iowait_event, },
>>> + { "sched:sched_migrate_task", process_sched_migrate_task_event, },
>>> + };
>>
>> I like the concept (obviously since I have invested so much time in other
>> solutions). But... you cannot rely on the sched_stat tracepoints being
>> enabled. I believe it is a performance hit to have CONFIG_SCHEDSTATS enabled
>> and distributions (e.g., Fedora) do not have it enabled.
>
> Yes, I know that some distributions don't enable SCHEDSTATS. But as
> perf sched record already requires it, I think it's ok to use those
> events in other sched commands.
>
> Maybe we could fix 'perf sched record' not to requires SCHEDSTATS.
I was going to suggest that a couple of years ago. You can't rely on it
in production environments, so my timehist command for example used
other approximations. Then if it is enabled it balloons the data file.
> All commands in perf sched just use stat_runtime event currently. And
> I guess we can calculate/approximate the stat times using sched_switch
> events (and wakeup events) only. But it also requires changing other
> sched commands not to use sched_stat_runtime.
That's what I do in my 'perf sched timehist' command.
David
prev parent reply other threads:[~2015-08-25 17:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 6:11 [RFC/PATCH] perf sched: Implement 'perf sched runtime' command Namhyung Kim
2015-08-25 6:19 ` David Ahern
2015-08-25 8:07 ` Namhyung Kim
2015-08-25 17:09 ` David Ahern [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=55DCA134.5090101@gmail.com \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@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