提交 6b118e92 编写于 作者: D David Ahern 提交者: Arnaldo Carvalho de Melo

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: NDavid Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1343709095-7089-5-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 70b40c4a
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "util/cpumap.h" #include "util/cpumap.h"
#include "util/xyarray.h" #include "util/xyarray.h"
#include "util/sort.h" #include "util/sort.h"
#include "util/intlist.h"
#include "util/debug.h" #include "util/debug.h"
...@@ -706,8 +707,16 @@ static void perf_event__process_sample(struct perf_tool *tool, ...@@ -706,8 +707,16 @@ static void perf_event__process_sample(struct perf_tool *tool,
int err; int err;
if (!machine && perf_guest) { if (!machine && perf_guest) {
pr_err("Can't find guest [%d]'s kernel information\n", static struct intlist *seen;
event->ip.pid);
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; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册