[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v4 10/20] xen/sysctl: wrap around XEN_SYSCTL_lockprof_op


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Wed, 28 May 2025 17:16:58 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=6PNM5kmGchxaBPy9UTeIPhmjlaI6cmNBtQ+7yjRXB+Y=; b=UlZio1P/jjlObvX7fsIr1uiCHol1Vcf5A4ptTAXexd/qiibkn6tXIcf+FEz+TBFStSE3pVc5UedS58Yw+1gGjA24+rap/LYWSIwPoKrT+Ew6PtgUoFsincOqUT8HsosccOw0Xmm7SFNaHgX2N9ScoAxYD9wyrs8QbJlYbknEJARCx+a1q1MSlx1Nm5gJQseM0CYIpvHgeTBqv7PYZgilvr24+V4/Poy3kgBVIg0MlWUkoeDl08O2nJk+m3M6gKUY0cwMjT8m0+VscZAQNDaXXeDpqohjmC73PnLSRFMwfeh5hiVIZz7fS1nohkqbc31YjOm53w6GRUK4qn+Tg2VmYQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FW+Sn6Qsmmzm5l9wGcSElkVrbgCfddXKslUdSX8xIplM8crnXGOzbwBRrNoPxlpVjX6QP0GKfx8ywr85ruYV6HnpPDNQ832ppjBQmKm2v+PWTAYtOSW73N5kb4jLt44cJOM6WlC1oNxDuUrBOiDnpbPnBRUGwJ2/YHF2axg0loMrjFJSbU/tYFoyOcfPk53SXdAkIrR96q9uqnpiYrc4KpTKw19wjg5UACK3VrwngRXVPOF8GdUZ79L+DKHR7R9J6UPbYMWkwJqqwwL0YeXfF/zE6w6rWQGBTtA32al4Dh2AFwA473zlSK9L3oGQUlU/U2SRp8UidAa5Cs4uphbPGw==
  • Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 28 May 2025 09:21:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The following function is only to serve spinlock profiling via
XEN_SYSCTL_lockprof_op, so it shall be wrapped:
- spinlock_profile_control()

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
v2 -> v3:
- add the blank line
---
v3 -> v4:
- removw transient "#ifdef CONFIG_SYSCTL"
---
 xen/common/spinlock.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c
index 38caa10a2e..0389293b09 100644
--- a/xen/common/spinlock.c
+++ b/xen/common/spinlock.c
@@ -690,6 +690,7 @@ void cf_check spinlock_profile_reset(unsigned char key)
     spinlock_profile_iterate(spinlock_profile_reset_elem, NULL);
 }
 
+#ifdef CONFIG_SYSCTL
 typedef struct {
     struct xen_sysctl_lockprof_op *pc;
     int                      rc;
@@ -749,6 +750,7 @@ int spinlock_profile_control(struct xen_sysctl_lockprof_op 
*pc)
 
     return rc;
 }
+#endif /* CONFIG_SYSCTL */
 
 void _lock_profile_register_struct(
     int32_t type, struct lock_profile_qhead *qhead, int32_t idx)
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.