diff options
| -rw-r--r-- | 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 34096275a7b5..68cd61ef6ac5 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include "util/cpumap.h" | 38 | #include "util/cpumap.h" |
| 39 | #include "util/xyarray.h" | 39 | #include "util/xyarray.h" |
| 40 | #include "util/sort.h" | 40 | #include "util/sort.h" |
| 41 | #include "util/intlist.h" | ||
| 41 | 42 | ||
| 42 | #include "util/debug.h" | 43 | #include "util/debug.h" |
| 43 | 44 | ||
| @@ -706,8 +707,16 @@ static void perf_event__process_sample(struct perf_tool *tool, | |||
| 706 | int err; | 707 | int err; |
| 707 | 708 | ||
| 708 | if (!machine && perf_guest) { | 709 | if (!machine && perf_guest) { |
| 709 | pr_err("Can't find guest [%d]'s kernel information\n", | 710 | static struct intlist *seen; |
| 710 | event->ip.pid); | 711 | |
| 712 | if (!seen) | ||
| 713 | seen = intlist__new(); | ||
| 714 | |||
| 715 | if (!intlist__has_entry(seen, event->ip.pid)) { | ||
| 716 | pr_err("Can't find guest [%d]'s kernel information\n", | ||
| 717 | event->ip.pid); | ||
| 718 | intlist__add(seen, event->ip.pid); | ||
| 719 | } | ||
| 711 | return; | 720 | return; |
| 712 | } | 721 | } |
| 713 | 722 | ||
