public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: eranian@google.com, dsahern@gmail.com, jolsa@kernel.org,
	mingo@kernel.org, namhyung@kernel.org, acme@redhat.com,
	hpa@zytor.com, linux-kernel@vger.kernel.org, andi@firstfloor.org,
	tglx@linutronix.de, a.p.zijlstra@chello.nl
Subject: [tip:perf/core] perf sched timehist: Enlarge max stack depth by 2
Date: Fri, 25 Nov 2016 09:20:09 -0800	[thread overview]
Message-ID: <tip-8388deb3ba4d36ffcae91a2a01cb2ea6f27553e6@git.kernel.org> (raw)
In-Reply-To: <20161124011114.7102-3-namhyung@kernel.org>

Commit-ID:  8388deb3ba4d36ffcae91a2a01cb2ea6f27553e6
Gitweb:     http://git.kernel.org/tip/8388deb3ba4d36ffcae91a2a01cb2ea6f27553e6
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Thu, 24 Nov 2016 10:11:14 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 25 Nov 2016 10:50:57 -0300

perf sched timehist: Enlarge max stack depth by 2

When it records callchains, they will always have 2 scheduler functions
(__schedule + schedule or __schedule + preempt_schedule) and get
ignored.  So it should collect 2 more functions to show the expected
number of callchains to user.

Committer Notes:

Example of final result, using the same perf.data file as in the
previous cset comment, but this time redirecting the output of 'perf
sched timehist' to a file instead of copy'n'pasting from xterm:

  [root@jouet experimental]# perf sched timehist > /tmp/bla
  [root@jouet experimental]# cat /tmp/bla
      time  cpu task name        wait time sch delay run time
                 [tid/pid]            (msec) (msec) (msec)
  -------- ----  -------------------- ------ ------ -----
  6.494998 [01] <idle>                0.000  0.000  0.000
  6.495027 [02] perf[519]             0.000  0.000  0.000 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- sys_poll
  6.495096 [03] <idle>                0.000  0.000  0.000
  6.495100 [03] rcuos/0[9]            0.000  0.005  0.003 rcu_nocb_kthread <- kthread <- ret_from_fork
  6.495113 [01] perf[520]             0.000  0.008  0.114 preempt_schedule_common <- _cond_resched <- wait_for_completion <- stop_one_cpu <- sched_exec <- do_execveat_common.isra.35
  6.495121 [00] <idle>                0.000  0.000  0.000
  6.495129 [01] migration/1[17]       0.000  0.003  0.016 smpboot_thread_fn <- kthread <- ret_from_fork
  6.496085 [02] <idle>                0.000  0.000  1.057
  6.496096 [02] kworker/u16:1[31169]  0.000  0.004  0.011 worker_thread <- kthread <- ret_from_fork
  6.496096 [03] <idle>                0.003  0.000  0.996
  6.496169 [02] <idle>                0.011  0.000  0.072
  6.496171 [00] ls[520]               0.008  0.000  1.049 do_exit <- do_group_exit <- [unknown] <- entry_SYSCALL_64_fastpath
  6.496172 [03] gnome-terminal-[4391] 0.000  0.003  0.076 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- sys_poll

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20161124011114.7102-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 06be809..a49a032 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1960,7 +1960,7 @@ static bool is_idle_sample(struct perf_sched *sched,
 		return false;
 
 	if (thread__resolve_callchain(thread, cursor, evsel, sample,
-				      NULL, NULL, sched->max_stack) != 0) {
+				      NULL, NULL, sched->max_stack + 2) != 0) {
 		if (verbose)
 			error("Failed to resolve callchain. Skipping\n");
 

  reply	other threads:[~2016-11-25 17:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24  1:11 [PATCH 1/3] perf sched timehist: Mark schedule function in callchains Namhyung Kim
2016-11-24  1:11 ` [PATCH 2/3] perf tools: Add option to skip ignore symbol when printing callchains Namhyung Kim
2016-11-25 17:19   ` [tip:perf/core] perf callchain: " tip-bot for Namhyung Kim
2016-11-24  1:11 ` [PATCH 3/3] perf sched timehist: Enlarge max stack depth by 2 Namhyung Kim
2016-11-25 17:20   ` tip-bot for Namhyung Kim [this message]
2016-11-24  3:13 ` [PATCH 1/3] perf sched timehist: Mark schedule function in callchains David Ahern
2016-11-24  6:30   ` Namhyung Kim
2016-11-26  3:38     ` David Ahern
2016-11-25 13:43 ` Arnaldo Carvalho de Melo
2016-11-25 17:19 ` [tip:perf/core] " tip-bot for Namhyung Kim

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=tip-8388deb3ba4d36ffcae91a2a01cb2ea6f27553e6@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    /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