* [PATCH] perf trace: Remove thread summary coloring
@ 2013-11-14 16:43 Pekka Enberg
2013-11-14 20:31 ` David Ahern
2013-11-30 12:49 ` [tip:perf/core] " tip-bot for Pekka Enberg
0 siblings, 2 replies; 4+ messages in thread
From: Pekka Enberg @ 2013-11-14 16:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Pekka Enberg
Thread summary line coloring looks ugly. It doesn't add much value so
remove coloring completely.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
tools/perf/builtin-trace.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 943087f..b03551e 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2150,7 +2150,6 @@ static int trace__fprintf_one_thread(struct thread *thread, void *priv)
size_t printed = data->printed;
struct trace *trace = data->trace;
struct thread_trace *ttrace = thread->priv;
- const char *color;
double ratio;
if (ttrace == NULL)
@@ -2158,17 +2157,9 @@ static int trace__fprintf_one_thread(struct thread *thread, void *priv)
ratio = (double)ttrace->nr_events / trace->nr_events * 100.0;
- color = PERF_COLOR_NORMAL;
- if (ratio > 50.0)
- color = PERF_COLOR_RED;
- else if (ratio > 25.0)
- color = PERF_COLOR_GREEN;
- else if (ratio > 5.0)
- color = PERF_COLOR_YELLOW;
-
- printed += color_fprintf(fp, color, " %s (%d), ", thread__comm_str(thread), thread->tid);
+ printed += fprintf(fp, " %s (%d), ", thread__comm_str(thread), thread->tid);
printed += fprintf(fp, "%lu events, ", ttrace->nr_events);
- printed += color_fprintf(fp, color, "%.1f%%", ratio);
+ printed += fprintf(fp, "%.1f%%", ratio);
printed += fprintf(fp, ", %.3f msec\n", ttrace->runtime_ms);
printed += thread__dump_stats(ttrace, trace, fp);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf trace: Remove thread summary coloring
2013-11-14 16:43 [PATCH] perf trace: Remove thread summary coloring Pekka Enberg
@ 2013-11-14 20:31 ` David Ahern
2013-11-14 20:37 ` Arnaldo Carvalho de Melo
2013-11-30 12:49 ` [tip:perf/core] " tip-bot for Pekka Enberg
1 sibling, 1 reply; 4+ messages in thread
From: David Ahern @ 2013-11-14 20:31 UTC (permalink / raw)
To: Pekka Enberg, linux-kernel, Arnaldo Carvalho de Melo
On 11/14/13, 9:43 AM, Pekka Enberg wrote:
> Thread summary line coloring looks ugly. It doesn't add much value so
> remove coloring completely.
>
> Signed-off-by: Pekka Enberg <penberg@kernel.org>
> ---
> tools/perf/builtin-trace.c | 13 ++-----------
> 1 file changed, 2 insertions(+), 11 deletions(-)
>
Looks good to me.
Acked-by: David Ahern <dsahern@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf trace: Remove thread summary coloring
2013-11-14 20:31 ` David Ahern
@ 2013-11-14 20:37 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-14 20:37 UTC (permalink / raw)
To: David Ahern; +Cc: Pekka Enberg, linux-kernel
Em Thu, Nov 14, 2013 at 01:31:48PM -0700, David Ahern escreveu:
> On 11/14/13, 9:43 AM, Pekka Enberg wrote:
> >Thread summary line coloring looks ugly. It doesn't add much value so
> >remove coloring completely.
> >
> >Signed-off-by: Pekka Enberg <penberg@kernel.org>
> >---
> > tools/perf/builtin-trace.c | 13 ++-----------
> > 1 file changed, 2 insertions(+), 11 deletions(-)
> >
>
> Looks good to me.
> Acked-by: David Ahern <dsahern@gmail.com>
Applied, and thanks David for bringing this to my attention :-)
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] perf trace: Remove thread summary coloring
2013-11-14 16:43 [PATCH] perf trace: Remove thread summary coloring Pekka Enberg
2013-11-14 20:31 ` David Ahern
@ 2013-11-30 12:49 ` tip-bot for Pekka Enberg
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Pekka Enberg @ 2013-11-30 12:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, penberg, dsahern, tglx
Commit-ID: 15e65c693d7de4c83d1e97fd89f87d47f2219782
Gitweb: http://git.kernel.org/tip/15e65c693d7de4c83d1e97fd89f87d47f2219782
Author: Pekka Enberg <penberg@kernel.org>
AuthorDate: Thu, 14 Nov 2013 18:43:30 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 27 Nov 2013 14:58:34 -0300
perf trace: Remove thread summary coloring
Thread summary line coloring looks ugly. It doesn't add much value so
remove coloring completely.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Acked-by: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1384447410-1771-1-git-send-email-penberg@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 8be17fc..e9f345e2 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2158,7 +2158,6 @@ static int trace__fprintf_one_thread(struct thread *thread, void *priv)
size_t printed = data->printed;
struct trace *trace = data->trace;
struct thread_trace *ttrace = thread->priv;
- const char *color;
double ratio;
if (ttrace == NULL)
@@ -2166,17 +2165,9 @@ static int trace__fprintf_one_thread(struct thread *thread, void *priv)
ratio = (double)ttrace->nr_events / trace->nr_events * 100.0;
- color = PERF_COLOR_NORMAL;
- if (ratio > 50.0)
- color = PERF_COLOR_RED;
- else if (ratio > 25.0)
- color = PERF_COLOR_GREEN;
- else if (ratio > 5.0)
- color = PERF_COLOR_YELLOW;
-
- printed += color_fprintf(fp, color, " %s (%d), ", thread__comm_str(thread), thread->tid);
+ printed += fprintf(fp, " %s (%d), ", thread__comm_str(thread), thread->tid);
printed += fprintf(fp, "%lu events, ", ttrace->nr_events);
- printed += color_fprintf(fp, color, "%.1f%%", ratio);
+ printed += fprintf(fp, "%.1f%%", ratio);
printed += fprintf(fp, ", %.3f msec\n", ttrace->runtime_ms);
printed += thread__dump_stats(ttrace, trace, fp);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-30 12:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 16:43 [PATCH] perf trace: Remove thread summary coloring Pekka Enberg
2013-11-14 20:31 ` David Ahern
2013-11-14 20:37 ` Arnaldo Carvalho de Melo
2013-11-30 12:49 ` [tip:perf/core] " tip-bot for Pekka Enberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.