[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/5] x86/perfc: conditionalize HVM and shadow counters
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 3 Dec 2021 13:04:21 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3+yaC36DqlsYgMBtQOA6Ygvl1IDjxBnVmeHuhg98YSw=; b=BNsB2S1hDC+n1GTCnC9+W+sqdG2R6CvrxPHlsrjEWTOZR6Q3ScDm2mLNTu0e+2VZgYKIs7FOknFzA4dCUF9rmpwECS7qmX0vZuvHxdiemFEcf39j+z9lHHov1dNFJg/CeEkjxpu5Cx7NRJOzW1ui/Qlt510NWaLbJUL5nXtiNuJMvWuOKdENL4fpnIKp5MOUbFV4RfT5q4Ys7B5uI4a9bo36/uX8Y2XjrN8Dvne49/3CllqzIyLAbp3vQ1wHYJJbNVrCCd32GVW5VuJvgVaHhm8GIsiPxT8oEcCwrqppwa8jzynexi3QFTCZ/j7bqiBvvF21xXycWdoyiJQgL/z8NA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kMxaTo5j16RN5X8zgqO22CAtF9pOAKIXToGkYzxHYY5mp9jvuYdmke0CTrCQoaG2Z5wO7hBADLB+wX8kytYvjbpkIGDogu6OZmsM4ASZ0vgAZEMXlgaEJHgxWc3FqYkPaAiF9o4MAQuesTqOg9HvEjW4b/qQ4VELGElkRyWcwyig8uyQ0aE7nQRyd/XsqaT7QTp7PtFsHNwb/MywSAMxBzxWrj4h8L8yOe3oEDKIbj0XqC97WL1zI3iHtXBATVfbaxfyYe5GBPiGqcScH0h48n3G/xBHRzth9GESveQesAZQxG8VKyAydcjSysmUd/sUjZwq+QKmbxgQgooVqDoGew==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 03 Dec 2021 12:04:30 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
There's no point including them when the respective functionality isn't
enabled in the build. Note that this covers only larger groups; more
fine grained exclusion may want to be done later on.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/include/asm-x86/perfc_defn.h
+++ b/xen/include/asm-x86/perfc_defn.h
@@ -4,6 +4,8 @@
PERFCOUNTER_ARRAY(exceptions, "exceptions", 32)
+#ifdef CONFIG_HVM
+
#define VMX_PERF_EXIT_REASON_SIZE 56
#define VMX_PERF_VECTOR_SIZE 0x20
PERFCOUNTER_ARRAY(vmexits, "vmexits", VMX_PERF_EXIT_REASON_SIZE)
@@ -13,6 +15,8 @@ PERFCOUNTER_ARRAY(cause_vector,
#define SVM_PERF_EXIT_REASON_SIZE (1+141)
PERFCOUNTER_ARRAY(svmexits, "SVMexits", SVM_PERF_EXIT_REASON_SIZE)
+#endif /* CONFIG_HVM */
+
PERFCOUNTER(seg_fixups, "segmentation fixups")
PERFCOUNTER(apic_timer, "apic timer interrupts")
@@ -37,6 +41,8 @@ PERFCOUNTER(exception_fixed, "pre
PERFCOUNTER(guest_walk, "guest pagetable walks")
/* Shadow counters */
+#ifdef CONFIG_SHADOW_PAGING
+
PERFCOUNTER(shadow_alloc, "calls to shadow_alloc")
PERFCOUNTER(shadow_alloc_tlbflush, "shadow_alloc flushed TLBs")
@@ -112,6 +118,8 @@ PERFCOUNTER(shadow_unsync, "shad
PERFCOUNTER(shadow_unsync_evict, "shadow OOS evictions")
PERFCOUNTER(shadow_resync, "shadow OOS resyncs")
+#endif /* CONFIG_SHADOW_PAGING */
+
PERFCOUNTER(realmode_emulations, "realmode instructions emulated")
PERFCOUNTER(realmode_exits, "vmexits from realmode")
|