[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 07/19] xen/sysctl: wrap around XEN_SYSCTL_lockprof_op
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> --- xen/common/spinlock.c | 2 ++ xen/include/xen/spinlock.h | 7 +++++++ 2 files changed, 9 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) diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index ca9d8c7ec0..7f2a814ee0 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -164,7 +164,14 @@ void _lock_profile_deregister_struct(int32_t type, #define lock_profile_deregister_struct(type, ptr) \ _lock_profile_deregister_struct(type, &((ptr)->profile_head)) +#ifdef CONFIG_SYSCTL extern int spinlock_profile_control(struct xen_sysctl_lockprof_op *pc); +#else +static inline int spinlock_profile_control(struct xen_sysctl_lockprof_op *pc) +{ + return -EOPNOTSUPP; +} +#endif extern void cf_check spinlock_profile_printall(unsigned char key); extern void cf_check spinlock_profile_reset(unsigned char key); -- 2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |