mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf kvm: Limit repetitive guestmount message to once per directory
After 7ed97ad use of the guestmount option without a subdir for *each*
VM generates an error message for each sample related to that VM. Once
per VM is enough.
Signed-off-by: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
adb5d2a487
commit
c80c3c2690
1 changed files with 10 additions and 1 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <unistd.h>
|
||||
#include "map.h"
|
||||
#include "thread.h"
|
||||
#include "strlist.h"
|
||||
|
||||
const char *map_type__name[MAP__NR_TYPES] = {
|
||||
[MAP__FUNCTION] = "Functions",
|
||||
|
|
@ -695,7 +696,15 @@ struct machine *machines__findnew(struct rb_root *self, pid_t pid)
|
|||
(symbol_conf.guestmount)) {
|
||||
sprintf(path, "%s/%d", symbol_conf.guestmount, pid);
|
||||
if (access(path, R_OK)) {
|
||||
pr_err("Can't access file %s\n", path);
|
||||
static struct strlist *seen;
|
||||
|
||||
if (!seen)
|
||||
seen = strlist__new(true, NULL);
|
||||
|
||||
if (!strlist__has_entry(seen, path)) {
|
||||
pr_err("Can't access file %s\n", path);
|
||||
strlist__add(seen, path);
|
||||
}
|
||||
machine = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue