Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1536643 > unrolled thread

[PATCHSET 00/10] perf sched timehist: Introduce --idle-hist option (v1)

Started byNamhyung Kim <namhyung@kernel.org>
First post2016-12-06 04:50 +0100
Last post2016-12-06 22:50 +0100
Articles 8 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCHSET 00/10] perf sched timehist: Introduce --idle-hist option (v1) Namhyung Kim <namhyung@kernel.org> - 2016-12-06 04:50 +0100
    [PATCH 01/10] perf sched: Cleanup option processing Namhyung Kim <namhyung@kernel.org> - 2016-12-06 04:50 +0100
      Re: [PATCH 01/10] perf sched: Cleanup option processing David Ahern <dsahern@gmail.com> - 2016-12-06 05:00 +0100
      [tip:perf/core] perf sched: Cleanup option processing tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-12-07 19:30 +0100
    [PATCH 02/10] perf tools: Introduce callchain_cursor__copy() Namhyung Kim <namhyung@kernel.org> - 2016-12-06 04:50 +0100
      [tip:perf/core] perf callchain: Introduce callchain_cursor__copy() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-12-07 19:30 +0100
    Re: [PATCHSET 00/10] perf sched timehist: Introduce --idle-hist  option (v1) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-06 20:50 +0100
      Re: [PATCHSET 00/10] perf sched timehist: Introduce --idle-hist  option (v1) David Ahern <dsahern@gmail.com> - 2016-12-06 22:50 +0100

#1536643 — [PATCHSET 00/10] perf sched timehist: Introduce --idle-hist option (v1)

FromNamhyung Kim <namhyung@kernel.org>
Date2016-12-06 04:50 +0100
Subject[PATCHSET 00/10] perf sched timehist: Introduce --idle-hist option (v1)
Message-ID<sLeVr-55B-3@gated-at.bofh.it>
Hi,

This patchset implements the idle hist feature which analyze reason of system
idle.  Sometimes I need to investigate what makes CPUs to go idle even though
I have jobs to do.  It may be due to I/O, waiting on lock or whatever.

To identify the reasons it only accounts events related to idle task.  Also it
shows callchains when entering to idle and time how long it's in the idle.
Although it's not perfect, it works well to help finding the reasons.

With --idle-hist option, only idle task's runtime is accounted to previous
task (which makes the cpu go to idle).  With --summary(-only) option, you can
see the total idle stat by task or callchains.

The example output looks like below:

  Idle-time summary
                            comm  parent  sched-out    idle-time   min-idle    avg-idle    max-idle  stddev  migrations
                                            (count)       (msec)     (msec)      (msec)      (msec)       %
  ---------------------------------------------------------------------------------------------------------------------
                  rcu_preempt[7]       2         95      550.872      0.011       5.798      23.146    7.63       0
                 migration/1[16]       2          1       15.558     15.558      15.558      15.558    0.00       0
                  khugepaged[39]       2          1        3.062      3.062       3.062       3.062    0.00       0
               kworker/0:1H[124]       2          2        4.728      0.611       2.364       4.116   74.12       0
            systemd-journal[167]       1          1        4.510      4.510       4.510       4.510    0.00       0
              kworker/u16:3[558]       2         13       74.737      0.080       5.749      12.960   21.96       0
             irq/34-iwlwifi[628]       2         21      118.403      0.032       5.638      23.990   24.00       0
              kworker/u17:0[673]       2          1        3.523      3.523       3.523       3.523    0.00       0
                dbus-daemon[722]       1          1        6.743      6.743       6.743       6.743    0.00       0
                    ifplugd[741]       1          1       58.826     58.826      58.826      58.826    0.00       0
            wpa_supplicant[1490]       1          1       13.302     13.302      13.302      13.302    0.00       0
               wpa_actiond[1492]       1          2        4.064      0.168       2.032       3.896   91.72       0
                   dockerd[1500]       1          1        0.055      0.055       0.055       0.055    0.00       0
              dockerd[1516/1500]    1500          1        5.732      5.732       5.732       5.732    0.00       0
              dockerd[1571/1500]    1500          1        0.020      0.020       0.020       0.020    0.00       0
  ...
  
  Idle stats:
      CPU  0 idle for    902.195  msec
      CPU  1 idle for    899.932  msec
      CPU  2 idle for    941.218  msec
      CPU  3 idle for    822.453  msec
  
  Idle stats by callchain:
    CPU  0:   902.195  msec
    Idle time (msec)     Count  Callchains
    ----------------  --------  --------------------------------------------------
             370.589        69  futex_wait_queue_me <- futex_wait <- do_futex <- sys_futex <- entry_SYSCALL_64_fastpath
             178.799        17  worker_thread <- kthread <- ret_from_fork
             128.352        17  schedule_timeout <- rcu_gp_kthread <- kthread <- ret_from_fork
             125.111        19  schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_select <- core_sys_select
              71.599        50  schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- sys_poll
              23.146         1  rcu_gp_kthread <- kthread <- ret_from_fork
               4.510         1  schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- ep_poll <- sys_epoll_wait <- do_syscall_64
               0.085         1  schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- do_restart_poll
  ...


The patch 1-5 are cleanup and preparations so they can be applied separately.
The patch 6-10 implements the -I/--idle-hist option.

The code is available at 'perf/timehist-idle-v1' branch in my tree:

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git 

Any comments are welcome!

Thanks,
Namhyung


Namhyung Kim (10):
  perf sched: Cleanup option processing
  perf tools: Introduce callchain_cursor__copy()
  perf sched timehist: Handle zero sample->tid properly
  perf sched timehist: Split is_idle_sample()
  perf sched timehist: Cleanup idle_max_cpu handling
  perf sched timehist: Introduce struct idle_time_data
  perf sched timehist: Save callchain when entering idle
  perf sched timehist: Skip non-idle events when necessary
  perf sched timehist: Add -I/--idle-hist option
  perf sched timehist: Show callchains for idle stat

 tools/perf/Documentation/perf-sched.txt |   4 +
 tools/perf/builtin-sched.c              | 264 +++++++++++++++++++++++++++-----
 tools/perf/util/callchain.c             |  27 ++++
 tools/perf/util/callchain.h             |   3 +
 4 files changed, 256 insertions(+), 42 deletions(-)

-- 
2.10.1

[toc] | [next] | [standalone]


#1536644 — [PATCH 01/10] perf sched: Cleanup option processing

FromNamhyung Kim <namhyung@kernel.org>
Date2016-12-06 04:50 +0100
Subject[PATCH 01/10] perf sched: Cleanup option processing
Message-ID<sLeVs-55B-27@gated-at.bofh.it>
In reply to#1536643
The -D/--dump-raw-trace option is in the parent option so no need to
repeat it.  Also move -f/--force option to parent as it's common to
handle data file.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-sched.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 870d94cd20ba..6991686bcaa5 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -2583,6 +2583,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
 	struct perf_data_file file = {
 		.path = input_name,
 		.mode = PERF_DATA_MODE_READ,
+		.force = sched->force,
 	};
 
 	struct perf_session *session;
@@ -2984,6 +2985,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		    "be more verbose (show symbol address, etc)"),
 	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
 		    "dump raw trace in ASCII"),
+	OPT_BOOLEAN('f', "force", &sched.force, "don't complain, do it"),
 	OPT_END()
 	};
 	const struct option latency_options[] = {
@@ -2991,8 +2993,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		   "sort by key(s): runtime, switch, avg, max"),
 	OPT_INTEGER('C', "CPU", &sched.profile_cpu,
 		    "CPU to profile on"),
-	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
-		    "dump raw trace in ASCII"),
 	OPT_BOOLEAN('p', "pids", &sched.skip_merge,
 		    "latency stats per pid instead of per comm"),
 	OPT_PARENT(sched_options)
@@ -3000,9 +3000,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 	const struct option replay_options[] = {
 	OPT_UINTEGER('r', "repeat", &sched.replay_repeat,
 		     "repeat the workload replay N times (-1: infinite)"),
-	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
-		    "dump raw trace in ASCII"),
-	OPT_BOOLEAN('f', "force", &sched.force, "don't complain, do it"),
 	OPT_PARENT(sched_options)
 	};
 	const struct option map_options[] = {
-- 
2.10.1

[toc] | [prev] | [next] | [standalone]


#1536648 — Re: [PATCH 01/10] perf sched: Cleanup option processing

FromDavid Ahern <dsahern@gmail.com>
Date2016-12-06 05:00 +0100
SubjectRe: [PATCH 01/10] perf sched: Cleanup option processing
Message-ID<sLf57-58I-15@gated-at.bofh.it>
In reply to#1536644
On 12/5/16 7:40 PM, Namhyung Kim wrote:
> The -D/--dump-raw-trace option is in the parent option so no need to
> repeat it.  Also move -f/--force option to parent as it's common to
> handle data file.
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/perf/builtin-sched.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 

Acked-by: David Ahern <dsahern@gmail.com>

[toc] | [prev] | [next] | [standalone]


#1537977 — [tip:perf/core] perf sched: Cleanup option processing

Fromtip-bot for Namhyung Kim <tipbot@zytor.com>
Date2016-12-07 19:30 +0100
Subject[tip:perf/core] perf sched: Cleanup option processing
Message-ID<sLP8B-3DP-21@gated-at.bofh.it>
In reply to#1536644
Commit-ID:  6fa94258ce2673adc707b2ec5668464f2cf83ed3
Gitweb:     http://git.kernel.org/tip/6fa94258ce2673adc707b2ec5668464f2cf83ed3
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 6 Dec 2016 12:40:01 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 7 Dec 2016 12:00:33 -0300

perf sched: Cleanup option processing

The -D/--dump-raw-trace option is in the parent option so no need to
repeat it.  Also move -f/--force option to parent as it's common to
handle data file.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20161206034010.6499-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 84c39f1..634d8cf 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -2583,6 +2583,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
 	struct perf_data_file file = {
 		.path = input_name,
 		.mode = PERF_DATA_MODE_READ,
+		.force = sched->force,
 	};
 
 	struct perf_session *session;
@@ -2988,6 +2989,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		    "be more verbose (show symbol address, etc)"),
 	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
 		    "dump raw trace in ASCII"),
+	OPT_BOOLEAN('f', "force", &sched.force, "don't complain, do it"),
 	OPT_END()
 	};
 	const struct option latency_options[] = {
@@ -2995,8 +2997,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		   "sort by key(s): runtime, switch, avg, max"),
 	OPT_INTEGER('C', "CPU", &sched.profile_cpu,
 		    "CPU to profile on"),
-	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
-		    "dump raw trace in ASCII"),
 	OPT_BOOLEAN('p', "pids", &sched.skip_merge,
 		    "latency stats per pid instead of per comm"),
 	OPT_PARENT(sched_options)
@@ -3004,9 +3004,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 	const struct option replay_options[] = {
 	OPT_UINTEGER('r', "repeat", &sched.replay_repeat,
 		     "repeat the workload replay N times (-1: infinite)"),
-	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
-		    "dump raw trace in ASCII"),
-	OPT_BOOLEAN('f', "force", &sched.force, "don't complain, do it"),
 	OPT_PARENT(sched_options)
 	};
 	const struct option map_options[] = {

[toc] | [prev] | [next] | [standalone]


#1536645 — [PATCH 02/10] perf tools: Introduce callchain_cursor__copy()

FromNamhyung Kim <namhyung@kernel.org>
Date2016-12-06 04:50 +0100
Subject[PATCH 02/10] perf tools: Introduce callchain_cursor__copy()
Message-ID<sLeVs-55B-29@gated-at.bofh.it>
In reply to#1536643
The callchain_cursor__copy() function is to save current callchain
captured by a cursor.  It'll be used to keep callchains when switching
to idle task for each cpu.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/callchain.c | 27 +++++++++++++++++++++++++++
 tools/perf/util/callchain.h |  3 +++
 2 files changed, 30 insertions(+)

diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 823befd8209a..42922512c1c6 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -1234,3 +1234,30 @@ int callchain_node__make_parent_list(struct callchain_node *node)
 	}
 	return -ENOMEM;
 }
+
+int callchain_cursor__copy(struct callchain_cursor *dst,
+			   struct callchain_cursor *src)
+{
+	int rc = 0;
+
+	callchain_cursor_reset(dst);
+	callchain_cursor_commit(src);
+
+	while (true) {
+		struct callchain_cursor_node *node;
+
+		node = callchain_cursor_current(src);
+		if (node == NULL)
+			break;
+
+		rc = callchain_cursor_append(dst, node->ip, node->map, node->sym,
+					     node->branch, &node->branch_flags,
+					     node->nr_loop_iter, node->samples);
+		if (rc)
+			break;
+
+		callchain_cursor_advance(src);
+	}
+
+	return rc;
+}
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index d9c70dccf06a..35c8e379530f 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -216,6 +216,9 @@ static inline void callchain_cursor_advance(struct callchain_cursor *cursor)
 	cursor->pos++;
 }
 
+int callchain_cursor__copy(struct callchain_cursor *dst,
+			   struct callchain_cursor *src);
+
 struct option;
 struct hist_entry;
 
-- 
2.10.1

[toc] | [prev] | [next] | [standalone]


#1537978 — [tip:perf/core] perf callchain: Introduce callchain_cursor__copy()

Fromtip-bot for Namhyung Kim <tipbot@zytor.com>
Date2016-12-07 19:30 +0100
Subject[tip:perf/core] perf callchain: Introduce callchain_cursor__copy()
Message-ID<sLP8B-3DP-25@gated-at.bofh.it>
In reply to#1536645
Commit-ID:  571f1eb9b967a52732d2e1f41f1b62e27c900325
Gitweb:     http://git.kernel.org/tip/571f1eb9b967a52732d2e1f41f1b62e27c900325
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 6 Dec 2016 12:40:02 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 7 Dec 2016 12:00:33 -0300

perf callchain: Introduce callchain_cursor__copy()

The callchain_cursor__copy() function is to save current callchain
captured by a cursor.  It'll be used to keep callchains when switching
to idle task for each cpu.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20161206034010.6499-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/callchain.c | 27 +++++++++++++++++++++++++++
 tools/perf/util/callchain.h |  3 +++
 2 files changed, 30 insertions(+)

diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 823befd..4292251 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -1234,3 +1234,30 @@ out:
 	}
 	return -ENOMEM;
 }
+
+int callchain_cursor__copy(struct callchain_cursor *dst,
+			   struct callchain_cursor *src)
+{
+	int rc = 0;
+
+	callchain_cursor_reset(dst);
+	callchain_cursor_commit(src);
+
+	while (true) {
+		struct callchain_cursor_node *node;
+
+		node = callchain_cursor_current(src);
+		if (node == NULL)
+			break;
+
+		rc = callchain_cursor_append(dst, node->ip, node->map, node->sym,
+					     node->branch, &node->branch_flags,
+					     node->nr_loop_iter, node->samples);
+		if (rc)
+			break;
+
+		callchain_cursor_advance(src);
+	}
+
+	return rc;
+}
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index d9c70dc..35c8e37 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -216,6 +216,9 @@ static inline void callchain_cursor_advance(struct callchain_cursor *cursor)
 	cursor->pos++;
 }
 
+int callchain_cursor__copy(struct callchain_cursor *dst,
+			   struct callchain_cursor *src);
+
 struct option;
 struct hist_entry;
 

[toc] | [prev] | [next] | [standalone]


#1537241 — Re: [PATCHSET 00/10] perf sched timehist: Introduce --idle-hist option (v1)

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-12-06 20:50 +0100
SubjectRe: [PATCHSET 00/10] perf sched timehist: Introduce --idle-hist option (v1)
Message-ID<sLtUt-6ii-1@gated-at.bofh.it>
In reply to#1536643
Em Tue, Dec 06, 2016 at 12:40:00PM +0900, Namhyung Kim escreveu:
> Hi,
> 
> This patchset implements the idle hist feature which analyze reason of system
> idle.  Sometimes I need to investigate what makes CPUs to go idle even though
> I have jobs to do.  It may be due to I/O, waiting on lock or whatever.

So, on a first round, I've applied the ones David acked, will try
pushing to Ingo today.

David, I still haven't myself reviewed the patches, before that, do you
have any strong objection to the other patches? Will you continue
reviewing them?

- Arnaldo
 
> To identify the reasons it only accounts events related to idle task.  Also it
> shows callchains when entering to idle and time how long it's in the idle.
> Although it's not perfect, it works well to help finding the reasons.
> 
> With --idle-hist option, only idle task's runtime is accounted to previous
> task (which makes the cpu go to idle).  With --summary(-only) option, you can
> see the total idle stat by task or callchains.
> 
> The example output looks like below:
> 
>   Idle-time summary
>                             comm  parent  sched-out    idle-time   min-idle    avg-idle    max-idle  stddev  migrations
>                                             (count)       (msec)     (msec)      (msec)      (msec)       %
>   ---------------------------------------------------------------------------------------------------------------------
>                   rcu_preempt[7]       2         95      550.872      0.011       5.798      23.146    7.63       0
>                  migration/1[16]       2          1       15.558     15.558      15.558      15.558    0.00       0
>                   khugepaged[39]       2          1        3.062      3.062       3.062       3.062    0.00       0
>                kworker/0:1H[124]       2          2        4.728      0.611       2.364       4.116   74.12       0
>             systemd-journal[167]       1          1        4.510      4.510       4.510       4.510    0.00       0
>               kworker/u16:3[558]       2         13       74.737      0.080       5.749      12.960   21.96       0
>              irq/34-iwlwifi[628]       2         21      118.403      0.032       5.638      23.990   24.00       0
>               kworker/u17:0[673]       2          1        3.523      3.523       3.523       3.523    0.00       0
>                 dbus-daemon[722]       1          1        6.743      6.743       6.743       6.743    0.00       0
>                     ifplugd[741]       1          1       58.826     58.826      58.826      58.826    0.00       0
>             wpa_supplicant[1490]       1          1       13.302     13.302      13.302      13.302    0.00       0
>                wpa_actiond[1492]       1          2        4.064      0.168       2.032       3.896   91.72       0
>                    dockerd[1500]       1          1        0.055      0.055       0.055       0.055    0.00       0
>               dockerd[1516/1500]    1500          1        5.732      5.732       5.732       5.732    0.00       0
>               dockerd[1571/1500]    1500          1        0.020      0.020       0.020       0.020    0.00       0
>   ...
>   
>   Idle stats:
>       CPU  0 idle for    902.195  msec
>       CPU  1 idle for    899.932  msec
>       CPU  2 idle for    941.218  msec
>       CPU  3 idle for    822.453  msec
>   
>   Idle stats by callchain:
>     CPU  0:   902.195  msec
>     Idle time (msec)     Count  Callchains
>     ----------------  --------  --------------------------------------------------
>              370.589        69  futex_wait_queue_me <- futex_wait <- do_futex <- sys_futex <- entry_SYSCALL_64_fastpath
>              178.799        17  worker_thread <- kthread <- ret_from_fork
>              128.352        17  schedule_timeout <- rcu_gp_kthread <- kthread <- ret_from_fork
>              125.111        19  schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_select <- core_sys_select
>               71.599        50  schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- sys_poll
>               23.146         1  rcu_gp_kthread <- kthread <- ret_from_fork
>                4.510         1  schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- ep_poll <- sys_epoll_wait <- do_syscall_64
>                0.085         1  schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- do_restart_poll
>   ...
> 
> 
> The patch 1-5 are cleanup and preparations so they can be applied separately.
> The patch 6-10 implements the -I/--idle-hist option.
> 
> The code is available at 'perf/timehist-idle-v1' branch in my tree:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git 
> 
> Any comments are welcome!
> 
> Thanks,
> Namhyung
> 
> 
> Namhyung Kim (10):
>   perf sched: Cleanup option processing
>   perf tools: Introduce callchain_cursor__copy()
>   perf sched timehist: Handle zero sample->tid properly
>   perf sched timehist: Split is_idle_sample()
>   perf sched timehist: Cleanup idle_max_cpu handling
>   perf sched timehist: Introduce struct idle_time_data
>   perf sched timehist: Save callchain when entering idle
>   perf sched timehist: Skip non-idle events when necessary
>   perf sched timehist: Add -I/--idle-hist option
>   perf sched timehist: Show callchains for idle stat
> 
>  tools/perf/Documentation/perf-sched.txt |   4 +
>  tools/perf/builtin-sched.c              | 264 +++++++++++++++++++++++++++-----
>  tools/perf/util/callchain.c             |  27 ++++
>  tools/perf/util/callchain.h             |   3 +
>  4 files changed, 256 insertions(+), 42 deletions(-)
> 
> -- 
> 2.10.1

[toc] | [prev] | [next] | [standalone]


#1537287 — Re: [PATCHSET 00/10] perf sched timehist: Introduce --idle-hist option (v1)

FromDavid Ahern <dsahern@gmail.com>
Date2016-12-06 22:50 +0100
SubjectRe: [PATCHSET 00/10] perf sched timehist: Introduce --idle-hist option (v1)
Message-ID<sLvMC-7vq-21@gated-at.bofh.it>
In reply to#1537241
On 12/6/16 11:44 AM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Dec 06, 2016 at 12:40:00PM +0900, Namhyung Kim escreveu:
>> Hi,
>>
>> This patchset implements the idle hist feature which analyze reason of system
>> idle.  Sometimes I need to investigate what makes CPUs to go idle even though
>> I have jobs to do.  It may be due to I/O, waiting on lock or whatever.
> So, on a first round, I've applied the ones David acked, will try
> pushing to Ingo today.
> 
> David, I still haven't myself reviewed the patches, before that, do you
> have any strong objection to the other patches? Will you continue
> reviewing them?

patches 7-10 were fine. It's an interesting feature. My main concern was the changes to detecting idle_sample. If it works properly on RHEL6, RHEL7, and top of tree then it should be fine.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web