From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Binh Q. Pham" Subject: Performance counters in kvm? Date: Wed, 13 Nov 2013 11:52:01 -0500 Message-ID: <5283AE31.1000303@cs.rutgers.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from dragon.rutgers.edu ([128.6.4.3]:47367 "EHLO dragon.rutgers.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754025Ab3KMRwH (ORCPT ); Wed, 13 Nov 2013 12:52:07 -0500 Received: from [172.16.70.34] (account binhpham@dragon.rutgers.edu [172.16.70.34] verified) by dragon.rutgers.edu (CommuniGate Pro SMTP 5.4.7) with ESMTPSA id 111869990 for kvm@vger.kernel.org; Wed, 13 Nov 2013 11:52:05 -0500 Sender: kvm-owner@vger.kernel.org List-ID: 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 the VM, all hardware events are not supported. Sample screen shot: perf stat /bin/ls Performance counter stats for '/bin/ls': cycles stalled-cycles-frontend .... Could someone clarify for me if I can use 'perf' in VM with the current kvm state? Thanks for your help, Binh