[Skiboot] [RFC PATCH] core/lock: Add debug options to store backtrace of where lock was taken

Andrew Donnellan andrew.donnellan at au1.ibm.com
Tue Feb 26 14:45:44 AEDT 2019


On 25/2/19 5:25 pm, Andrew Donnellan wrote:
>> this is behind a #if for DEBUG=1, right?
> 
> it is not, but I can fix that...
> 
>>> +#ifdef DEBUG_LOCKS_BACKTRACE
>>> +    struct bt_entry bt_buf[60];
>>> +    unsigned int bt_ents;
>>> +    unsigned long bt_token;
>>> +    unsigned long bt_r1_caller;
>>> +    unsigned long bt_pir;
>>> +#endif
>>
>> almost feels like it should be a struct.
> 
> And if we made it a struct, that would make it easier to clean up the 
> API and make stuff like this easier in future... hmm...

I'll send another version which addresses both these points and does 
some refactoring around the backtrace API.

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list