All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH 2/5] x86/perfc: conditionalize HVM and shadow counters
Date: Fri, 3 Dec 2021 13:04:21 +0100	[thread overview]
Message-ID: <ea513864-58c0-fb90-cee6-f668309fcc38@suse.com> (raw)
In-Reply-To: <57038a1c-671b-f0f9-1bf1-0ff9bae6e2dc@suse.com>

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@suse.com>

--- 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")
 



  parent reply	other threads:[~2021-12-03 12:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 12:02 [PATCH 0/5] perfc: assorted adjustments Jan Beulich
2021-12-03 12:03 ` [PATCH 1/5] perfc: conditionalize credit/credit2 counters Jan Beulich
2021-12-03 16:30   ` Luca Fancellu
2021-12-03 12:04 ` Jan Beulich [this message]
2021-12-17 14:35   ` [PATCH 2/5] x86/perfc: conditionalize HVM and shadow counters Andrew Cooper
2021-12-03 12:05 ` [PATCH 3/5] VMX: sync VM-exit perf counters with known VM-exit reasons Jan Beulich
2021-12-17 15:00   ` Andrew Cooper
2021-12-21 10:27     ` Jan Beulich
2021-12-03 12:06 ` [PATCH 4/5] SVM: " Jan Beulich
2021-12-17 15:02   ` Andrew Cooper
2021-12-21  7:52     ` Jan Beulich
2021-12-03 12:07 ` [PATCH 5/5] xenperf: name "newer" hypercalls Jan Beulich
2021-12-17 15:07   ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea513864-58c0-fb90-cee6-f668309fcc38@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.