[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-6b118e92cc78ccef7b54a296158d4738fd377bcc@git.kernel.org>
Date: Sun, 5 Aug 2012 09:58:45 -0700
From: tip-bot for David Ahern <dsahern@...il.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, hpa@...or.com,
mingo@...nel.org, peterz@...radead.org, namhyung@...nel.org,
jolsa@...hat.com, fweisbec@...il.com, dsahern@...il.com,
tglx@...utronix.de
Subject: [tip:perf/urgent] perf kvm top:
Limit guest kernel info message to once
Commit-ID: 6b118e92cc78ccef7b54a296158d4738fd377bcc
Gitweb: http://git.kernel.org/tip/6b118e92cc78ccef7b54a296158d4738fd377bcc
Author: David Ahern <dsahern@...il.com>
AuthorDate: Mon, 30 Jul 2012 22:31:35 -0600
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 3 Aug 2012 10:43:47 -0300
perf kvm top: Limit guest kernel info message to once
'perf kvm top' shows a continual flurry of:
Can't find guest [5201]'s kernel information
if it can't find the guest info and with a lot of VMs running a user has no
chance of reading them all. Limit message to once per guest.
Signed-off-by: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/1343709095-7089-5-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-top.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 3409627..68cd61e 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -38,6 +38,7 @@
#include "util/cpumap.h"
#include "util/xyarray.h"
#include "util/sort.h"
+#include "util/intlist.h"
#include "util/debug.h"
@@ -706,8 +707,16 @@ static void perf_event__process_sample(struct perf_tool *tool,
int err;
if (!machine && perf_guest) {
- pr_err("Can't find guest [%d]'s kernel information\n",
- event->ip.pid);
+ static struct intlist *seen;
+
+ if (!seen)
+ seen = intlist__new();
+
+ if (!intlist__has_entry(seen, event->ip.pid)) {
+ pr_err("Can't find guest [%d]'s kernel information\n",
+ event->ip.pid);
+ intlist__add(seen, event->ip.pid);
+ }
return;
}
--
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