Re: [PATCH] perf tools: fix guest mode monitoring on AMD

From: Joerg Roedel
Date: Mon Feb 27 2012 - 13:23:24 EST


On Mon, Feb 27, 2012 at 06:52:25PM +0100, Stephane Eranian wrote:
> Yeah, but that causes simple commands such as "perf stat -e cycles ls"
> to return 0 count.
>
> So either you get a segfault or you get zero count. There is something
> else going on here...

Hmm, looks like the counters will not do any counting when EFER.SVME==0
and HO==1 or GO==1 is set in the counters :(
A solution would be to mask out these bits in the perf-ctrl register
when EFER.SVME=0

I'll try to come up with a fix soon.


Joerg

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