mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: David Ahern <dsahern@gmail.com>
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 17:07:06 +0900	[thread overview]
Message-ID: <20150825080706.GA21465@danjae.kornet> (raw)
In-Reply-To: <55DC0900.3010500@gmail.com>

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.
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.

Thanks,
Namhyung

  reply	other threads:[~2015-08-25  8:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25  6:11 Namhyung Kim
2015-08-25  6:19 ` David Ahern
2015-08-25  8:07   ` Namhyung Kim [this message]
2015-08-25 17:09     ` David Ahern

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=20150825080706.GA21465@danjae.kornet \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@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

all inboxes | Powered by JetHome®