[Skiboot] [PATCH 7/7] core/lock: Add debug options to store backtrace of where lock was taken
stewart at linux.ibm.com
Fri Mar 29 15:23:47 AEDT 2019
Andrew Donnellan <andrew.donnellan at au1.ibm.com> writes:
> On 18/3/19 3:29 pm, Andrew Donnellan wrote:
>> Contrary to popular belief, skiboot developers are imperfect and
>> occasionally write locking bugs. When we exit skiboot, we check if we're
>> still holding any locks, and if so, we print an error with a list of the
>> locks currently held and the locations where they were taken.
>> However, this only tells us the location where lock() was called, which may
>> not be enough to work out what's going on. To give us more to go on with,
>> we can store backtrace data in the lock and print that out when we
>> unexpectedly still hold locks.
>> Because the backtrace data is rather big, we only enable this if
>> DEBUG_LOCKS_BACKTRACE is defined, which in turn is switched on when
>> Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> Apparently this causes a test failure in core/test/run-mem_region, which
> is interesting!
It is! I bet it's something to do with size of the structures and the
hairy duck tape (or is it duct, I've watched whole youtube videos on this and
still can't remember) holding those tests together.
Anyway, I've taken patches 1-6 as of
b965b9de25d2270c4ba65b3dc31fd9649a8c922f as they're good cleanup
anyway. I think I went and ensured everything looks correct... I
possibly need to context switch less :)
OPAL Architect, IBM.
More information about the Skiboot