kernel: Rewrite B_DEBUG_SPINLOCK_CONTENTION.
* Replace count_low/count_high with bigtime_t fields plus an int32. sizeof(spinlock) is now 32 bytes with the debug option enabled. * Adjust and clean up all spinlock code to use the new fields. * Fold DEBUG_SPINLOCK_LATENCIES into the new code. Remove the bootloader option and other flags for it (these were not compiled in by default.) The new code should be much easier to understand and also more powerful. However, the information transmitted to userland isn't as useful now; the KDL command output will have the interesting information. (Things could be reworked to transmit more interesting information to userland again if desired, but as this code clearly hadn't been compiled for many years, as it referred to global spinlocks that have been gone for a very long time.) Change-Id: I2cb34078bfdc7604f288a297b6cd1aa7ff9cc512 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6943 Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
ef9e2f627b
commit
76681bd900
@@ -20,8 +20,5 @@
|
||||
#define B_SAFEMODE_4_GB_MEMORY_LIMIT "4gb_memory_limit"
|
||||
#define B_SAFEMODE_256_TB_MEMORY_LIMIT "256tb_memory_limit"
|
||||
|
||||
#if DEBUG_SPINLOCK_LATENCIES
|
||||
# define B_SAFEMODE_DISABLE_LATENCY_CHECK "disable_latency_check"
|
||||
#endif
|
||||
|
||||
#endif /* _SYSTEM_SAFEMODE_DEFS_H */
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
|
||||
|
||||
typedef struct spinlock_contention_info {
|
||||
uint64 thread_spinlock_counter;
|
||||
uint64 team_spinlock_counter;
|
||||
bigtime_t thread_creation_spinlock;
|
||||
} spinlock_contention_info;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user