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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 27 Feb 2012 19:39:00 +0200
From:	Gleb Natapov <gleb@...hat.com>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	linux-kernel@...r.kernel.org, acme@...hat.com,
	robert.richter@....com, peterz@...radead.org, mingo@...e.hu,
	joro@...tes.org, joerg.roedel@....com
Subject: Re: [PATCH] perf tools: fix guest mode monitoring on AMD

On Mon, Feb 27, 2012 at 06:33:51PM +0100, Stephane Eranian wrote:
> Commit:
> 
> 1aed267 perf kvm: Do guest-only counting by default
>  
> introduced a bug on AMD systems whereby simple commands:
> 
> $ perf stat ls
> Performance counter stats for 'ls':
>                  0 cycles                    #    0.000 GHz                    
>        0.003704596 seconds time elapsed
> 
> would not count anything anymore. Same results for perf record.
> 
> I tracked it down to guest mode exclusion being enabled
> by default leading to attr->exclude_guest = 1. When
> not operating under any sort of virtualization, this
> causes the PMU not to count anything.
CCing Joerg. I think he fixed this or similar problem recently.

> 
> The fix disables guest exclusion by default.
> 
> Signed-off-by: Stephane Eranian <eranian@...gle.com>
> ---
> 
> diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
> index 8109a90..c1017b3 100644
> --- a/tools/perf/util/util.c
> +++ b/tools/perf/util/util.c
> @@ -6,7 +6,7 @@
>   * XXX We need to find a better place for these things...
>   */
>  bool perf_host  = true;
> -bool perf_guest = false;
> +bool perf_guest = true;
>  
>  void event_attr_init(struct perf_event_attr *attr)
>  {

--
			Gleb.
--
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