[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-93fc64f14472ae24fd640bf3834a178f59142842@git.kernel.org>
Date: Mon, 31 Jan 2011 12:49:50 GMT
From: tip-bot for Arnaldo Carvalho de Melo <acme@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, eranian@...gle.com, paulus@...ba.org,
acme@...hat.com, hpa@...or.com, mingo@...hat.com,
tzanussi@...il.com, peterz@...radead.org, efault@....de,
fweisbec@...il.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/core] perf top: Switch to non overwrite mode
Commit-ID: 93fc64f14472ae24fd640bf3834a178f59142842
Gitweb: http://git.kernel.org/tip/93fc64f14472ae24fd640bf3834a178f59142842
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Sat, 29 Jan 2011 12:08:00 -0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Sat, 29 Jan 2011 16:24:57 -0200
perf top: Switch to non overwrite mode
Just like 'perf record'. Warn the user when PERF_RECORD_LOST events
happen.
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Tom Zanussi <tzanussi@...il.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-top.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index ce2e50c..7f92ab7 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -464,7 +464,7 @@ static void rb_insert_active_sym(struct rb_root *tree, struct sym_entry *se)
rb_insert_color(&se->rb_node, tree);
}
-static void print_sym_table(void)
+static void print_sym_table(struct perf_session *session)
{
int printed = 0, j;
struct perf_evsel *counter;
@@ -513,7 +513,6 @@ static void print_sym_table(void)
puts(CONSOLE_CLEAR);
- printf("%-*.*s\n", win_width, win_width, graph_dotted_line);
if (!perf_guest) {
printf(" PerfTop:%8.0f irqs/sec kernel:%4.1f%%"
" exact: %4.1f%% [",
@@ -578,6 +577,12 @@ static void print_sym_table(void)
printf("%-*.*s\n", win_width, win_width, graph_dotted_line);
+ if (session->hists.stats.total_lost != 0) {
+ color_fprintf(stdout, PERF_COLOR_RED, "WARNING:");
+ printf(" LOST %" PRIu64 " events, Check IO/CPU overload\n",
+ session->hists.stats.total_lost);
+ }
+
if (sym_filter_entry) {
show_details(sym_filter_entry);
return;
@@ -919,7 +924,7 @@ repeat:
getc(stdin);
do {
- print_sym_table();
+ print_sym_table(session);
} while (!poll(&stdin_poll, 1, delay_msecs) == 1);
c = getc(stdin);
@@ -1176,7 +1181,7 @@ try_again:
}
}
- if (perf_evlist__mmap(evlist, cpus, threads, mmap_pages, true) < 0)
+ if (perf_evlist__mmap(evlist, cpus, threads, mmap_pages, false) < 0)
die("failed to mmap with %d (%s)\n", errno, strerror(errno));
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists