Re: Performance counters in kvm?

2013-12-10 Thread Gleb Natapov
On Mon, Dec 09, 2013 at 01:59:41PM -0500, Binh Q. Pham wrote: Sorry for a late response as I was distracted by another task in the last few weeks. Today, I compiled and installed QEMU 1.7.0 from source, but no luck with this. Tested on a different machine with different kernel version: 3.2, I

Re: Performance counters in kvm?

2013-12-10 Thread Binh Q. Pham
On 12/10/2013 05:59 AM, Gleb Natapov wrote: On Mon, Dec 09, 2013 at 01:59:41PM -0500, Binh Q. Pham wrote: Sorry for a late response as I was distracted by another task in the last few weeks. Today, I compiled and installed QEMU 1.7.0 from source, but no luck with this. Tested on a different

Re: Performance counters in kvm?

2013-12-09 Thread Binh Q. Pham
Sorry for a late response as I was distracted by another task in the last few weeks. Today, I compiled and installed QEMU 1.7.0 from source, but no luck with this. Tested on a different machine with different kernel version: 3.2, I got the same results. Btw, I found bug 798936 which describes

Re: Performance counters in kvm?

2013-11-14 Thread Binh Q. Pham
I am using: QEMU emulator version 1.5.0 (Debian 1.5.0+dfsg-3ubuntu5), Copyright (c) 2003-2008 Fabrice Bellard Attached files are output from cpuinfo and dmesg that you asked for. Thanks, Binh On 11/14/2013 02:16 AM, Gleb Natapov wrote: On Wed, Nov 13, 2013 at 10:22:54PM -0500, Binh Q. Pham

Re: Performance counters in kvm?

2013-11-14 Thread Gleb Natapov
On Thu, Nov 14, 2013 at 11:17:36AM -0500, Binh Q. Pham wrote: I am using: QEMU emulator version 1.5.0 (Debian 1.5.0+dfsg-3ubuntu5), Copyright (c) 2003-2008 Fabrice Bellard Attached files are output from cpuinfo and dmesg that you asked for. What is the output of cpuid in the guest? BTW your

Re: Performance counters in kvm?

2013-11-14 Thread Binh Q. Pham
cpuid output is attached. I didn't know that the kernel was not compiled with virtualization support as I was using a ready image from ubuntu website to install the VM. In the long run, are you suggesting me to recompile the kernel for the guest to make sure that it has virtualization support?

Re: Performance counters in kvm?

2013-11-14 Thread Gleb Natapov
On Thu, Nov 14, 2013 at 12:04:50PM -0500, Binh Q. Pham wrote: cpuid output is attached. PMU support is not advertised to the guest which means that either QEMU is broken or your host kernel does not have PMU kvm support. What is your host kernel version? I didn't know that the kernel was not

Re: Performance counters in kvm?

2013-11-14 Thread Binh Q. Pham
My host kernel version is 3.10.17 Binh On 11/14/2013 12:21 PM, Gleb Natapov wrote: On Thu, Nov 14, 2013 at 12:04:50PM -0500, Binh Q. Pham wrote: cpuid output is attached. PMU support is not advertised to the guest which means that either QEMU is broken or your host kernel does not have PMU

Re: Performance counters in kvm?

2013-11-14 Thread Gleb Natapov
On Thu, Nov 14, 2013 at 03:31:01PM -0500, Binh Q. Pham wrote: My host kernel version is 3.10.17 That one surely has PMU emulation, but your guest does not see it. I blame QEMU. Can you compile QEMU from git? Binh On 11/14/2013 12:21 PM, Gleb Natapov wrote: On Thu, Nov 14, 2013 at 12:04:50PM

Performance counters in kvm?

2013-11-13 Thread Binh Q. Pham
Hi all, I just started using kvm and want to use linux 'perf' tool inside the virtual machine to get some information about the hardware performance counters. I noticed in kvm source, there is pmu.c and pmu-stubs.c, so I assume they provide support for PMU. However, when I ran 'perf stat' in

Re: Performance counters in kvm?

2013-11-13 Thread Gleb Natapov
On Wed, Nov 13, 2013 at 11:52:01AM -0500, Binh Q. Pham wrote: Hi all, I just started using kvm and want to use linux 'perf' tool inside the virtual machine to get some information about the hardware performance counters. I noticed in kvm source, there is pmu.c and pmu-stubs.c, so I assume

Re: Performance counters in kvm?

2013-11-13 Thread Binh Q. Pham
Hi Gleb, Thanks for the suggestion, but I just tried to specify the cpu type to QEMU: -cpu host and I got the same output. Binh On 11/13/2013 12:54 PM, Gleb Natapov wrote: On Wed, Nov 13, 2013 at 11:52:01AM -0500, Binh Q. Pham wrote: Hi all, I just started using kvm and want to use linux

Re: Performance counters in kvm?

2013-11-13 Thread Gleb Natapov
On Wed, Nov 13, 2013 at 10:22:54PM -0500, Binh Q. Pham wrote: Hi Gleb, Thanks for the suggestion, but I just tried to specify the cpu type to QEMU: -cpu host and I got the same output. Which QEMU version are you using, what is the output of cat /proc/cpuinfo in the guest and attach guest's