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


Groups > linux.kernel > #1506828 > unrolled thread

[PATCH 1/3] perf sched map: Apply cpu color when there's an activity

Started byNamhyung Kim <namhyung@kernel.org>
First post2016-10-24 04:10 +0200
Last post2016-10-25 23:30 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/3] perf sched map: Apply cpu color when there's an activity Namhyung Kim <namhyung@kernel.org> - 2016-10-24 04:10 +0200
    Re: [PATCH 1/3] perf sched map: Apply cpu color when there's an  activity Jiri Olsa <jolsa@redhat.com> - 2016-10-24 18:50 +0200
    Re: [PATCH 1/3] perf sched map: Apply cpu color when there's an  activity Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-25 20:10 +0200
      Re: [PATCH 1/3] perf sched map: Apply cpu color when there's an  activity Namhyung Kim <namhyung@kernel.org> - 2016-10-25 23:30 +0200

#1506828 — [PATCH 1/3] perf sched map: Apply cpu color when there's an activity

FromNamhyung Kim <namhyung@kernel.org>
Date2016-10-24 04:10 +0200
Subject[PATCH 1/3] perf sched map: Apply cpu color when there's an activity
Message-ID<svCS6-18W-9@gated-at.bofh.it>
Applying cpu color always doesn't help readability IMHO.  Instead it
might be better to applying the color when there's an activity on those
CPUs.

Cc: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 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 f5503ca22e1c..78006e991d91 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1479,7 +1479,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel,
 			cpu_color = COLOR_CPUS;
 
 		if (cpu != this_cpu)
-			color_fprintf(stdout, cpu_color, " ");
+			color_fprintf(stdout, color, " ");
 		else
 			color_fprintf(stdout, cpu_color, "*");
 
-- 
2.10.0

[toc] | [next] | [standalone]


#1507423 — Re: [PATCH 1/3] perf sched map: Apply cpu color when there's an activity

FromJiri Olsa <jolsa@redhat.com>
Date2016-10-24 18:50 +0200
SubjectRe: [PATCH 1/3] perf sched map: Apply cpu color when there's an activity
Message-ID<svQBH-1Ks-13@gated-at.bofh.it>
In reply to#1506828
On Mon, Oct 24, 2016 at 11:02:43AM +0900, Namhyung Kim wrote:
> Applying cpu color always doesn't help readability IMHO.  Instead it
> might be better to applying the color when there's an activity on those
> CPUs.

ok, I added it to easily spot cpu columns I was interested in,
but I think I can live with dotted line ;-)

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> 
> Cc: Jiri Olsa <jolsa@kernel.org>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  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 f5503ca22e1c..78006e991d91 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -1479,7 +1479,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel,
>  			cpu_color = COLOR_CPUS;
>  
>  		if (cpu != this_cpu)
> -			color_fprintf(stdout, cpu_color, " ");
> +			color_fprintf(stdout, color, " ");
>  		else
>  			color_fprintf(stdout, cpu_color, "*");
>  
> -- 
> 2.10.0
> 

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


#1508530 — Re: [PATCH 1/3] perf sched map: Apply cpu color when there's an activity

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-10-25 20:10 +0200
SubjectRe: [PATCH 1/3] perf sched map: Apply cpu color when there's an activity
Message-ID<swekF-GE-3@gated-at.bofh.it>
In reply to#1506828
Em Mon, Oct 24, 2016 at 11:02:43AM +0900, Namhyung Kim escreveu:
> Applying cpu color always doesn't help readability IMHO.  Instead it
> might be better to applying the color when there's an activity on those
> CPUs.

thanks, applied the three patches.

- Arnaldo
 
> Cc: Jiri Olsa <jolsa@kernel.org>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  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 f5503ca22e1c..78006e991d91 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -1479,7 +1479,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel,
>  			cpu_color = COLOR_CPUS;
>  
>  		if (cpu != this_cpu)
> -			color_fprintf(stdout, cpu_color, " ");
> +			color_fprintf(stdout, color, " ");
>  		else
>  			color_fprintf(stdout, cpu_color, "*");
>  
> -- 
> 2.10.0

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


#1508657 — Re: [PATCH 1/3] perf sched map: Apply cpu color when there's an activity

FromNamhyung Kim <namhyung@kernel.org>
Date2016-10-25 23:30 +0200
SubjectRe: [PATCH 1/3] perf sched map: Apply cpu color when there's an activity
Message-ID<swhse-2CS-13@gated-at.bofh.it>
In reply to#1508530
Hi Arnaldo,

On Tue, Oct 25, 2016 at 03:07:46PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Oct 24, 2016 at 11:02:43AM +0900, Namhyung Kim escreveu:
> > Applying cpu color always doesn't help readability IMHO.  Instead it
> > might be better to applying the color when there's an activity on those
> > CPUs.
> 
> thanks, applied the three patches.

Thanks, but unfortunately the patch 3/3 has a bug.  Could you please
fold the fix below into the patch?

Thanks,
Namhyung


diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index f0ab715b4923..a8e58d495a66 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1218,7 +1218,7 @@ static void output_lat_thread(struct perf_sched *sched, struct work_atoms *work_
 	      (double)work_list->total_runtime / NSEC_PER_MSEC,
 		 work_list->nb_atoms, (double)avg / NSEC_PER_MSEC,
 		 (double)work_list->max_lat / NSEC_PER_MSEC,
-		 timestamp_in_usec(buf, sizeof(buf), work_list->max_lat));
+		 timestamp_in_usec(buf, sizeof(buf), work_list->max_lat_at));
 }
 
 static int pid_cmp(struct work_atoms *l, struct work_atoms *r)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web