build: convert lock_profile to Kconfig

Convert the 'lock_profile' option to Kconfig as CONFIG_LOCK_PROFILE.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
This commit is contained in:
Doug Goldstein authored and Jan Beulich committed 2016-06-08 14:11:50 +02:00
1 parent 635c5ec3f0
commit 9fd5902db0
10 files changed
+22 -15

No files matched your search

-1
View File
@@ -227,7 +227,6 @@ VGABIOS_REL_DATE="dd Mon yyyy"
The following variables can be used to tweak some aspects of the
hypervisor build.
lock_profile=y
lto=y
During tools build external repos will be cloned into the source tree.
+7
View File
@@ -28,6 +28,13 @@ config FRAME_POINTER
maybe slower, but it gives very useful debugging information
in case of any Xen bugs.
config LOCK_PROFILE
bool "Lock Profiling"
---help---
Lock profiling allows you to see how often locks are taken and blocked.
You can use serial console to print (and reset) using 'l' and 'L'
respectively, or the 'xenlockprof' tool.
config PERF_COUNTERS
bool "Performance Counters"
---help---
+3 -2
View File
@@ -3,7 +3,6 @@
# If you change any of these configuration options then you must
# 'make clean' before rebuilding.
#
lock_profile ?= n
lto ?= n
-include $(BASEDIR)/include/config/auto.conf
@@ -23,6 +22,9 @@ endif
ifneq ($(origin kexec),undefined)
$(error "You must use 'make menuconfig' to enable/disable kexec now.")
endif
ifneq ($(origin lock_profile),undefined)
$(error "You must use 'make menuconfig' to enable/disable lock_profile now.")
endif
ifneq ($(origin perfc),undefined)
$(error "You must use 'make menuconfig' to enable/disable perfc now.")
endif
@@ -56,7 +58,6 @@ ifneq ($(clang),y)
CFLAGS += -Wa,--strip-local-absolute
endif
CFLAGS-$(lock_profile) += -DLOCK_PROFILE
CFLAGS-$(CONFIG_FRAME_POINTER) += -fno-omit-frame-pointer
ifneq ($(max_phys_irqs),)
+1 -1
View File
@@ -54,7 +54,7 @@ SECTIONS
*(.rodata)
*(.rodata.*)
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
. = ALIGN(POINTER_ALIGN);
__lock_profile_start = .;
*(.lockprofile.data)
+1 -1
View File
@@ -251,7 +251,7 @@ struct domain *alloc_domain_struct(void)
#endif
#ifndef LOCK_PROFILE
#ifndef CONFIG_LOCK_PROFILE
BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
#endif
d = alloc_xenheap_pages(order, MEMF_bits(bits));
+1 -1
View File
@@ -103,7 +103,7 @@ SECTIONS
*(.ex_table.pre)
__stop___pre_ex_table = .;
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
. = ALIGN(POINTER_ALIGN);
__lock_profile_start = .;
*(.lockprofile.data)
+1 -1
View File
@@ -64,7 +64,7 @@ static struct keyhandler {
KEYHANDLER('P', perfc_reset, "reset performance counters", 0),
#endif
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
KEYHANDLER('l', spinlock_profile_printall, "print lock profile info", 1),
KEYHANDLER('L', spinlock_profile_reset, "reset lock profile info", 0),
#endif
+5 -5
View File
@@ -85,7 +85,7 @@ void spin_debug_disable(void)
#endif
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
#define LOCK_PROFILE_REL \
if (lock->profile) \
@@ -212,7 +212,7 @@ int _spin_trylock(spinlock_t *lock)
if ( cmpxchg(&lock->tickets.head_tail,
old.head_tail, new.head_tail) != old.head_tail )
return 0;
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
if (lock->profile)
lock->profile->time_locked = NOW();
#endif
@@ -227,7 +227,7 @@ int _spin_trylock(spinlock_t *lock)
void _spin_barrier(spinlock_t *lock)
{
spinlock_tickets_t sample;
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
s_time_t block = NOW();
#endif
@@ -238,7 +238,7 @@ void _spin_barrier(spinlock_t *lock)
{
while ( observe_head(&lock->tickets) == sample.head )
arch_lock_relax();
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
if ( lock->profile )
{
lock->profile->time_block += NOW() - block;
@@ -296,7 +296,7 @@ void _spin_unlock_recursive(spinlock_t *lock)
}
}
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
struct lock_profile_anc {
struct lock_profile_qhead *head_q; /* first head of this type */
+1 -1
View File
@@ -121,7 +121,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
break;
#endif
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
case XEN_SYSCTL_lockprof_op:
ret = spinlock_profile_control(&op->u.lockprof_op);
break;
+2 -2
View File
@@ -20,7 +20,7 @@ struct lock_debug { };
#define spin_debug_disable() ((void)0)
#endif
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
#include <public/sysctl.h>
@@ -144,7 +144,7 @@ typedef struct spinlock {
u16 recurse_cnt:4;
#define SPINLOCK_MAX_RECURSE 0xfu
struct lock_debug debug;
#ifdef LOCK_PROFILE
#ifdef CONFIG_LOCK_PROFILE
struct lock_profile *profile;
#endif
} spinlock_t;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.