From e6f7b6be39b50e4b1c4ded59fc2b911be5c40f58 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Mon, 30 Jul 2012 22:31:35 -0600 Subject: [PATCH] --- yaml --- r: 321422 b: refs/heads/master c: 6b118e92cc78ccef7b54a296158d4738fd377bcc h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-top.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b85fb44c0515..d53474c1a65a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 70b40c4a43ddfcf7a06dad4be32ff1dd2b62be09 +refs/heads/master: 6b118e92cc78ccef7b54a296158d4738fd377bcc diff --git a/trunk/tools/perf/builtin-top.c b/trunk/tools/perf/builtin-top.c index 34096275a7b5..68cd61ef6ac5 100644 --- a/trunk/tools/perf/builtin-top.c +++ b/trunk/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; }