From: David Ahern <dsahern@gmail.com>
To: acme@ghostprotocols.net, linux-kernel@vger.kernel.org
Cc: David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 4/4] perf kvm top: limit guest kernel info message to once
Date: Mon, 30 Jul 2012 22:31:35 -0600 [thread overview]
Message-ID: <1343709095-7089-5-git-send-email-dsahern@gmail.com> (raw)
In-Reply-To: <1343709095-7089-1-git-send-email-dsahern@gmail.com>
'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@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
tools/perf/builtin-top.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 35e86c6..0687c82 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;
}
--
1.7.10.1
next prev parent reply other threads:[~2012-07-31 4:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 4:31 [PATCH 0/4] limit guest messages to once in perf kvm top David Ahern
2012-07-31 4:31 ` [PATCH 1/4] perf tool: introducing rblist David Ahern
2012-08-05 16:56 ` [tip:perf/urgent] perf tools: Introducing rblist tip-bot for David Ahern
2012-07-31 4:31 ` [PATCH 2/4] perf tool: change strlist to use the new rblist David Ahern
2012-08-05 16:56 ` [tip:perf/urgent] perf tools: Change " tip-bot for David Ahern
2012-07-31 4:31 ` [PATCH 3/4] perf tool: introduce intlist David Ahern
2012-08-05 16:57 ` [tip:perf/urgent] perf tools: Introduce intlist tip-bot for David Ahern
2012-07-31 4:31 ` David Ahern [this message]
2012-08-05 16:58 ` [tip:perf/urgent] perf kvm top: Limit guest kernel info message to once tip-bot for David Ahern
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=1343709095-7089-5-git-send-email-dsahern@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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