Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754072AbbDTPCy (ORCPT ); Mon, 20 Apr 2015 11:02:54 -0400 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:47512 "EHLO e28smtp01.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753925AbbDTPCv (ORCPT ); Mon, 20 Apr 2015 11:02:51 -0400 From: Hemant Kumar To: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, acme@kernel.org, peterz@infradead.org, mingo@kernel.org, mpe@ellerman.id.au, maddy@linux.vnet.ibm.com, warrier@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com, paulus@samba.org Subject: [PATCH v2 0/5] KVM events analysis on powerpc with perf Date: Mon, 20 Apr 2015 20:32:10 +0530 Message-Id: <1429542135-10632-1-git-send-email-hemant@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.3 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042015-4790-0000-0000-000007ACCB64 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1967 Lines: 41 Hello! This patchset enables "perf kvm stat record/report" on powerpc, which can be used to analyze certain KVM events : KVM exits and hypervisor calls. The statistics can be shown individually for each running VM in the host and hence, can be useful in giving an idea of the performance of a VM on a certain workload. Example usages are shown in each of the patches individually. Here is a sample output : Analyze events for pid(s) 60515, all VCPUs: VM-EXIT Samples Samples% Time% Min Time Max Time Avg time H_DATA_STORAGE 5006 35.30% 0.13% 1.94us 49.46us 12.37us ( +- 0.52% ) HV_DECREMENTER 4457 31.43% 0.02% 0.72us 16.14us 1.91us ( +- 0.96% ) SYSCALL 2690 18.97% 0.10% 2.84us 528.24us 18.29us ( +- 3.75% ) RETURN_TO_HOST 1789 12.61% 99.76% 1.58us 672791.91us 27470.23us ( +- 3.00% ) EXTERNAL 240 1.69% 0.00% 0.69us 10.67us 1.33us ( +- 5.34% ) Total Samples:14182, Total events handled time:49264158.30us. The above example shows how many number of kvm exits have happened during a certain period of time. Along with the total number of exits, it also groups all the exits based on their reasons. Frequency for individual exit reasons is also shown. This patchset makes use of kvm_hv tracepoints and enables "perf kvm stat record" to trace on them. After recording, "perf kvm stat report" does all the post processing of parsing the events captured and classifying them according to their exit reasons (which are already availabe in "trace_book3s.h"). Similar method is used with hcall analysis. Thanks, Hemant Kumar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/