From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Pekka Enberg <penberg@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 02/25] perf trace: Remove thread summary coloring
Date: Mon, 25 Nov 2013 11:17:32 -0300 [thread overview]
Message-ID: <1385389075-7989-3-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1385389075-7989-1-git-send-email-acme@infradead.org>
From: Pekka Enberg <penberg@kernel.org>
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 8be17fc462ba..e9f345e2551a 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);
--
1.8.1.4
next prev parent reply other threads:[~2013-11-25 14:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 14:17 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 01/25] tools lib traceevent: Use helper trace-seq in print functions like kernel does Arnaldo Carvalho de Melo
2013-11-25 14:17 ` Arnaldo Carvalho de Melo [this message]
2013-11-25 14:17 ` [PATCH 03/25] perf top: Make -g refer to callchains Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 04/25] perf completion: Introduce a layer of indirection Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 05/25] perf completion: Factor out compgen stuff Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 06/25] perf completion: Factor out call to __ltrim_colon_completions Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 07/25] perf completion: Introduce zsh support Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 08/25] perf completion: Rename file to reflect " Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 09/25] perf script: Move evname print code to process_event() Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 10/25] perf record: Make per-cpu mmaps the default Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 11/25] perf tools: Allow '--inherit' as the negation of '--no-inherit' Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 12/25] perf tools: Add option macro OPT_BOOLEAN_SET Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 13/25] perf record: Default -t option to no inheritance Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 14/25] perf timechart: Always try to print at least 15 tasks Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 15/25] perf timechart: Add option to limit number of tasks Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 16/25] perf timechart: Use proc_num to implement --power-only Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 17/25] perf timechart: Add support for displaying only tasks related data Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 18/25] perf timechart: Group figures and add title with details Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 19/25] perf timechart: Add support for -P and -T in timechart recording Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 20/25] perf timechart: Add backtrace support Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 21/25] perf evsel: Skip ignored symbols while printing callchain Arnaldo Carvalho de Melo
2013-11-26 10:52 ` Adrian Hunter
2013-11-26 14:20 ` Arnaldo Carvalho de Melo
2013-11-26 14:30 ` David Ahern
2013-11-26 14:33 ` Arnaldo Carvalho de Melo
2013-11-26 16:18 ` Ingo Molnar
2013-11-25 14:17 ` [PATCH 22/25] perf symbols: Move idle syms check from top to generic function Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 23/25] perf thread: Move comm_list check into function Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 24/25] perf tools: Export setup_list Arnaldo Carvalho de Melo
2013-11-25 14:17 ` [PATCH 25/25] perf script: Print callchains and symbols if they exist Arnaldo Carvalho de Melo
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=1385389075-7989-3-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=penberg@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®