spinlocks: print lock profile info in panic()
authorJuergen Gross <jgross@suse.com>
Tue, 17 Sep 2019 14:08:48 +0000 (16:08 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Sep 2019 14:08:48 +0000 (16:08 +0200)
commit6e0fc1c5114994ba6e671c82b91411dd835ae2b9
tree44b3ca8b50d3a75d265f7bf5fa78b27f5ff78749
parentcf063792b8194026f7a422fc8bea1462ee26c46d
spinlocks: print lock profile info in panic()

Print the lock profile data when the system crashes and add some more
information for each lock data (lock address, cpu holding the lock).
While at it use the PRI_stime format specifier for printing time data.

This is especially beneficial for watchdog triggered crashes in case
of deadlocks.

In order to have the cpu holding the lock available let the
lock profile config option select DEBUG_LOCKS.

As printing the lock profile data will make use of locking, too, we
need to disable spinlock debugging before calling
spinlock_profile_printall() from panic().

While at it remove a superfluous #ifdef CONFIG_LOCK_PROFILE and rename
CONFIG_LOCK_PROFILE to CONFIG_DEBUG_LOCK_PROFILE.

Also move the .lockprofile.data section to init area in linker scripts
as the data is no longer needed after boot.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/Kconfig.debug
xen/arch/arm/xen.lds.S
xen/arch/x86/domain.c
xen/arch/x86/xen.lds.S
xen/common/keyhandler.c
xen/common/spinlock.c
xen/common/sysctl.c
xen/drivers/char/console.c
xen/include/xen/spinlock.h