[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG



On 09.01.2020 11:39, George Dunlap wrote:
> On 1/9/20 10:30 AM, Jan Beulich wrote:
>> On 09.01.2020 11:15, Jürgen Groß  wrote:
>>> On 09.01.20 11:07, George Dunlap wrote:
>>>> On 1/9/20 5:40 AM, Juergen Gross wrote:
>>>>> In expert mode it is possible to enable CONFIG_DEBUG_LOCKS without
>>>>> having enabled CONFIG_DEBUG. The coding is depending on CONFIG_DEBUG
>>>>> as it is using ASSERT(), however.
>>>>
>>>> Any reason not to use BUG_ON() in that case?
>>>
>>> The main reason is the missing message which condition failed.
>>>
>>> A rename ("BUG_ASSERT"?) could be an alternative to just dropping
>>> the message. Both would be fine with me.
>>
>> How about
>>
>>     if ( ... )
>>     {
>>         printk(...);
>>         BUG();
>>     }
> 
> Is there a reason we can't make BUG_ON() print the condition?

Of course we could, in principle, at the price of a meaningful
growth of the .rodata section. If we do this, perhaps we'd want
something like Linux'es CONFIG_DEBUG_BUGVERBOSE to control this.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.