lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Jul 2012 20:11:17 +0200
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	David Ahern <dsahern@...il.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 06/11] perf kvm: limit repetitive guestmount message to
 once per directory

Em Fri, Jul 20, 2012 at 05:25:51PM -0600, David Ahern escreveu:
> 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 <dsahern@...il.com>
> Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> ---
>  tools/perf/util/map.c |   11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
> index 16d783d..cc33486 100644
> --- a/tools/perf/util/map.c
> +++ b/tools/perf/util/map.c
> @@ -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);
> +			}

At some point we'll need to have __exit functions in userland perf so
that we can delete this when using mem leak detectors :-\ Applying
anyway.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ