xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH v2 0/2] xen: fix CONFIG_DEBUG_LOCKS
@ 2020-01-09 13:48 Juergen Gross
  2020-01-09 13:48 ` [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message Juergen Gross
  2020-01-09 13:48 ` [Xen-devel] [PATCH v2 2/2] xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG Juergen Gross
  0 siblings, 2 replies; 10+ messages in thread
From: Juergen Gross @ 2020-01-09 13:48 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, Stefano Stabellini, Julien Grall, Wei Liu,
	Konrad Rzeszutek Wilk, George Dunlap, Andrew Cooper, Ian Jackson,
	Jan Beulich, Roger Pau Monné

CONFIG_DEBUG_LOCKS is using ASSERT() for catching issues making it
depend on CONFIG_DEBUG.

This series fixes that by using BUG_ON() instead. In order not to lose
the rather nice debugging information which condition was hit add a
config option to include a message similar to the one ASSERT() is
printing in case of BUG_OM() triggering.

Juergen Gross (2):
  xen: add config option to include failing condition in BUG_ON()
    message
  xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG

 xen/Kconfig.debug         | 6 ++++++
 xen/common/spinlock.c     | 2 +-
 xen/include/asm-x86/bug.h | 5 +++--
 xen/include/xen/lib.h     | 5 +++++
 4 files changed, 15 insertions(+), 3 deletions(-)

-- 
2.16.4


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message
  2020-01-09 13:48 [Xen-devel] [PATCH v2 0/2] xen: fix CONFIG_DEBUG_LOCKS Juergen Gross
@ 2020-01-09 13:48 ` Juergen Gross
  2020-01-14 15:47   ` Jan Beulich
  2020-01-09 13:48 ` [Xen-devel] [PATCH v2 2/2] xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG Juergen Gross
  1 sibling, 1 reply; 10+ messages in thread
From: Juergen Gross @ 2020-01-09 13:48 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, Stefano Stabellini, Julien Grall, Wei Liu,
	Konrad Rzeszutek Wilk, George Dunlap, Andrew Cooper, Ian Jackson,
	Jan Beulich, Roger Pau Monné

Today a triggering BUG_ON() will only print source file and line
information. Add the possibility to print the triggering condition like
ASSERT().

Do that by introducing BUG_ON_VERBOSE() and add a Kconfig option to
make BUG_ON use BUG_ON_VERBOSE().

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/Kconfig.debug         | 6 ++++++
 xen/include/asm-x86/bug.h | 5 +++--
 xen/include/xen/lib.h     | 5 +++++
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index b3511e81a2..dfbcac575a 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -81,6 +81,12 @@ config PERF_ARRAYS
 	---help---
 	  Enables software performance counter array histograms.
 
+config DEBUG_BUGVERBOSE
+	bool "Verbose BUG_ON messages"
+	default DEBUG
+	---help---
+	  In case a BUG_ON triggers additionally print the triggering
+	  condition on the console.
 
 config VERBOSE_DEBUG
 	bool "Verbose debug messages"
diff --git a/xen/include/asm-x86/bug.h b/xen/include/asm-x86/bug.h
index 9bb4a19420..46d282777f 100644
--- a/xen/include/asm-x86/bug.h
+++ b/xen/include/asm-x86/bug.h
@@ -60,10 +60,11 @@ struct bug_frame {
 
 
 #define WARN() BUG_FRAME(BUGFRAME_warn, __LINE__, __FILE__, 0, NULL)
-#define BUG() do {                                              \
-    BUG_FRAME(BUGFRAME_bug,  __LINE__, __FILE__, 0, NULL);      \
+#define BUG_VERBOSE(msg) do {                                   \
+    BUG_FRAME(BUGFRAME_bug,  __LINE__, __FILE__, 0, msg);       \
     unreachable();                                              \
 } while (0)
+#define BUG() BUG_VERBOSE(NULL)
 
 #define run_in_exception_handler(fn) BUG_FRAME(BUGFRAME_run_fn, 0, fn, 0, NULL)
 
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index 8fbe84032d..e7770b0d24 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -8,7 +8,12 @@
 #include <xen/string.h>
 #include <asm/bug.h>
 
+#define BUG_ON_VERBOSE(p) do { if (unlikely(p)) BUG_VERBOSE(#p);  } while (0)
+#ifdef CONFIG_DEBUG_BUGVERBOSE
+#define BUG_ON(p)  BUG_ON_VERBOSE(p)
+#else
 #define BUG_ON(p)  do { if (unlikely(p)) BUG();  } while (0)
+#endif
 #define WARN_ON(p) do { if (unlikely(p)) WARN(); } while (0)
 
 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-- 
2.16.4


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Xen-devel] [PATCH v2 2/2] xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG
  2020-01-09 13:48 [Xen-devel] [PATCH v2 0/2] xen: fix CONFIG_DEBUG_LOCKS Juergen Gross
  2020-01-09 13:48 ` [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message Juergen Gross
@ 2020-01-09 13:48 ` Juergen Gross
  2020-01-09 14:13   ` Jan Beulich
  1 sibling, 1 reply; 10+ messages in thread
From: Juergen Gross @ 2020-01-09 13:48 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, Stefano Stabellini, Julien Grall, Wei Liu,
	Konrad Rzeszutek Wilk, George Dunlap, Andrew Cooper, Ian Jackson,
	Jan Beulich

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.

Fix that by using BUG_ON() instead of ASSERT() in rel_lock().

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/common/spinlock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c
index 286f916bca..344981c54a 100644
--- a/xen/common/spinlock.c
+++ b/xen/common/spinlock.c
@@ -86,7 +86,7 @@ static void got_lock(union lock_debug *debug)
 static void rel_lock(union lock_debug *debug)
 {
     if ( atomic_read(&spin_debug) > 0 )
-        ASSERT(debug->cpu == smp_processor_id());
+        BUG_ON(debug->cpu != smp_processor_id());
     debug->cpu = SPINLOCK_NO_CPU;
 }
 
-- 
2.16.4


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH v2 2/2] xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG
  2020-01-09 13:48 ` [Xen-devel] [PATCH v2 2/2] xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG Juergen Gross
@ 2020-01-09 14:13   ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2020-01-09 14:13 UTC (permalink / raw)
  To: Juergen Gross
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, xen-devel

On 09.01.2020 14:48, 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.
> 
> Fix that by using BUG_ON() instead of ASSERT() in rel_lock().
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message
  2020-01-09 13:48 ` [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message Juergen Gross
@ 2020-01-14 15:47   ` Jan Beulich
  2020-01-14 16:00     ` Jürgen Groß
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2020-01-14 15:47 UTC (permalink / raw)
  To: Juergen Gross
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, xen-devel,
	Roger Pau Monné

On 09.01.2020 14:48, Juergen Gross wrote:
> --- a/xen/Kconfig.debug
> +++ b/xen/Kconfig.debug
> @@ -81,6 +81,12 @@ config PERF_ARRAYS
>  	---help---
>  	  Enables software performance counter array histograms.
>  
> +config DEBUG_BUGVERBOSE
> +	bool "Verbose BUG_ON messages"
> +	default DEBUG
> +	---help---
> +	  In case a BUG_ON triggers additionally print the triggering
> +	  condition on the console.
>  
>  config VERBOSE_DEBUG

While I can see reasons to put this here, doing so means the option
will be unavailable in non-EXPERT release builds. Is it intended to
be that way?

> --- a/xen/include/xen/lib.h
> +++ b/xen/include/xen/lib.h
> @@ -8,7 +8,12 @@
>  #include <xen/string.h>
>  #include <asm/bug.h>
>  
> +#define BUG_ON_VERBOSE(p) do { if (unlikely(p)) BUG_VERBOSE(#p);  } while (0)
> +#ifdef CONFIG_DEBUG_BUGVERBOSE
> +#define BUG_ON(p)  BUG_ON_VERBOSE(p)

Looks like this will fail to build on Arm? Also - any particular
reason for the introduction of the separate BUG_ON_VERBOSE(),
when BUG_ON() could directly use BUG_VERBOSE()? I don't think we
want to encourage use of BUG_ON_VERBOSE() elsewhere ...

Jan

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message
  2020-01-14 15:47   ` Jan Beulich
@ 2020-01-14 16:00     ` Jürgen Groß
  2020-01-14 16:12       ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Jürgen Groß @ 2020-01-14 16:00 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, xen-devel,
	Roger Pau Monné

On 14.01.20 16:47, Jan Beulich wrote:
> On 09.01.2020 14:48, Juergen Gross wrote:
>> --- a/xen/Kconfig.debug
>> +++ b/xen/Kconfig.debug
>> @@ -81,6 +81,12 @@ config PERF_ARRAYS
>>   	---help---
>>   	  Enables software performance counter array histograms.
>>   
>> +config DEBUG_BUGVERBOSE
>> +	bool "Verbose BUG_ON messages"
>> +	default DEBUG
>> +	---help---
>> +	  In case a BUG_ON triggers additionally print the triggering
>> +	  condition on the console.
>>   
>>   config VERBOSE_DEBUG
> 
> While I can see reasons to put this here, doing so means the option
> will be unavailable in non-EXPERT release builds. Is it intended to
> be that way?

I can move it either to xen/Kconfig or in Kconfig.debug out of the
"if expert" section if you want.

> 
>> --- a/xen/include/xen/lib.h
>> +++ b/xen/include/xen/lib.h
>> @@ -8,7 +8,12 @@
>>   #include <xen/string.h>
>>   #include <asm/bug.h>
>>   
>> +#define BUG_ON_VERBOSE(p) do { if (unlikely(p)) BUG_VERBOSE(#p);  } while (0)
>> +#ifdef CONFIG_DEBUG_BUGVERBOSE
>> +#define BUG_ON(p)  BUG_ON_VERBOSE(p)
> 
> Looks like this will fail to build on Arm? Also - any particular

Uh, shame on me!

> reason for the introduction of the separate BUG_ON_VERBOSE(),
> when BUG_ON() could directly use BUG_VERBOSE()? I don't think we
> want to encourage use of BUG_ON_VERBOSE() elsewhere ...

I wanted to offer that option. If you want me to remove it I wouldn't
mind.


Juergen

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message
  2020-01-14 16:00     ` Jürgen Groß
@ 2020-01-14 16:12       ` Jan Beulich
  2020-01-16 18:54         ` Andrew Cooper
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2020-01-14 16:12 UTC (permalink / raw)
  To: Jürgen Groß
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, xen-devel,
	Roger Pau Monné

On 14.01.2020 17:00, Jürgen Groß wrote:
> On 14.01.20 16:47, Jan Beulich wrote:
>> On 09.01.2020 14:48, Juergen Gross wrote:
>>> --- a/xen/Kconfig.debug
>>> +++ b/xen/Kconfig.debug
>>> @@ -81,6 +81,12 @@ config PERF_ARRAYS
>>>   	---help---
>>>   	  Enables software performance counter array histograms.
>>>   
>>> +config DEBUG_BUGVERBOSE
>>> +	bool "Verbose BUG_ON messages"
>>> +	default DEBUG
>>> +	---help---
>>> +	  In case a BUG_ON triggers additionally print the triggering
>>> +	  condition on the console.
>>>   
>>>   config VERBOSE_DEBUG
>>
>> While I can see reasons to put this here, doing so means the option
>> will be unavailable in non-EXPERT release builds. Is it intended to
>> be that way?
> 
> I can move it either to xen/Kconfig or in Kconfig.debug out of the
> "if expert" section if you want.

I think this would be better, but give others a chance to voice
opinions.

>>> --- a/xen/include/xen/lib.h
>>> +++ b/xen/include/xen/lib.h
>>> @@ -8,7 +8,12 @@
>>>   #include <xen/string.h>
>>>   #include <asm/bug.h>
>>>   
>>> +#define BUG_ON_VERBOSE(p) do { if (unlikely(p)) BUG_VERBOSE(#p);  } while (0)
>>> +#ifdef CONFIG_DEBUG_BUGVERBOSE
>>> +#define BUG_ON(p)  BUG_ON_VERBOSE(p)
>>
>> Looks like this will fail to build on Arm? Also - any particular
> 
> Uh, shame on me!
> 
>> reason for the introduction of the separate BUG_ON_VERBOSE(),
>> when BUG_ON() could directly use BUG_VERBOSE()? I don't think we
>> want to encourage use of BUG_ON_VERBOSE() elsewhere ...
> 
> I wanted to offer that option. If you want me to remove it I wouldn't
> mind.

As above - unless there are good reasons (making others to agree
with you to have it), I'd prefer to not see it being independently
usable, at least for the time being.

Jan

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message
  2020-01-14 16:12       ` Jan Beulich
@ 2020-01-16 18:54         ` Andrew Cooper
  2020-01-17  8:39           ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Cooper @ 2020-01-16 18:54 UTC (permalink / raw)
  To: Jan Beulich, Jürgen Groß
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Ian Jackson, xen-devel, Roger Pau Monné

On 14/01/2020 16:12, Jan Beulich wrote:
> On 14.01.2020 17:00, Jürgen Groß wrote:
>> On 14.01.20 16:47, Jan Beulich wrote:
>>> On 09.01.2020 14:48, Juergen Gross wrote:
>>>> --- a/xen/Kconfig.debug
>>>> +++ b/xen/Kconfig.debug
>>>> @@ -81,6 +81,12 @@ config PERF_ARRAYS
>>>>   	---help---
>>>>   	  Enables software performance counter array histograms.
>>>>   
>>>> +config DEBUG_BUGVERBOSE
>>>> +	bool "Verbose BUG_ON messages"
>>>> +	default DEBUG
>>>> +	---help---
>>>> +	  In case a BUG_ON triggers additionally print the triggering
>>>> +	  condition on the console.
>>>>   
>>>>   config VERBOSE_DEBUG
>>> While I can see reasons to put this here, doing so means the option
>>> will be unavailable in non-EXPERT release builds. Is it intended to
>>> be that way?
>> I can move it either to xen/Kconfig or in Kconfig.debug out of the
>> "if expert" section if you want.
> I think this would be better, but give others a chance to voice
> opinions.

TBH, I don't think anyone will be interested in not having the strings. 
The change is what? a couple of hundred bytes?  That is a fraction of
the size of some functions we have.

Personally, I wouldn't even bother having the option.

>
>>>> --- a/xen/include/xen/lib.h
>>>> +++ b/xen/include/xen/lib.h
>>>> @@ -8,7 +8,12 @@
>>>>   #include <xen/string.h>
>>>>   #include <asm/bug.h>
>>>>   
>>>> +#define BUG_ON_VERBOSE(p) do { if (unlikely(p)) BUG_VERBOSE(#p);  } while (0)
>>>> +#ifdef CONFIG_DEBUG_BUGVERBOSE
>>>> +#define BUG_ON(p)  BUG_ON_VERBOSE(p)
>>> Looks like this will fail to build on Arm? Also - any particular
>> Uh, shame on me!
>>
>>> reason for the introduction of the separate BUG_ON_VERBOSE(),
>>> when BUG_ON() could directly use BUG_VERBOSE()? I don't think we
>>> want to encourage use of BUG_ON_VERBOSE() elsewhere ...
>> I wanted to offer that option. If you want me to remove it I wouldn't
>> mind.
> As above - unless there are good reasons (making others to agree
> with you to have it), I'd prefer to not see it being independently
> usable, at least for the time being.

I'd agree with the wish to not have a new flavour of BUG_ON().

People writing code aren't going to want the complexity of thinking
about it, and people who care about the presence/absence of messages
will care about it globally, not on a per-use bases.

~Andrew

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message
  2020-01-16 18:54         ` Andrew Cooper
@ 2020-01-17  8:39           ` Jan Beulich
  2020-01-17  8:53             ` Jürgen Groß
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2020-01-17  8:39 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Juergen Gross, Stefano Stabellini, Julien Grall, Wei Liu,
	Konrad Rzeszutek Wilk, George Dunlap, IanJackson, xen-devel,
	Roger Pau Monné

On 16.01.2020 19:54, Andrew Cooper wrote:
> On 14/01/2020 16:12, Jan Beulich wrote:
>> On 14.01.2020 17:00, Jürgen Groß wrote:
>>> On 14.01.20 16:47, Jan Beulich wrote:
>>>> On 09.01.2020 14:48, Juergen Gross wrote:
>>>>> --- a/xen/Kconfig.debug
>>>>> +++ b/xen/Kconfig.debug
>>>>> @@ -81,6 +81,12 @@ config PERF_ARRAYS
>>>>>   	---help---
>>>>>   	  Enables software performance counter array histograms.
>>>>>   
>>>>> +config DEBUG_BUGVERBOSE
>>>>> +	bool "Verbose BUG_ON messages"
>>>>> +	default DEBUG
>>>>> +	---help---
>>>>> +	  In case a BUG_ON triggers additionally print the triggering
>>>>> +	  condition on the console.
>>>>>   
>>>>>   config VERBOSE_DEBUG
>>>> While I can see reasons to put this here, doing so means the option
>>>> will be unavailable in non-EXPERT release builds. Is it intended to
>>>> be that way?
>>> I can move it either to xen/Kconfig or in Kconfig.debug out of the
>>> "if expert" section if you want.
>> I think this would be better, but give others a chance to voice
>> opinions.
> 
> TBH, I don't think anyone will be interested in not having the strings. 
> The change is what? a couple of hundred bytes?  That is a fraction of
> the size of some functions we have.

Well, it's a couple thousand (about 7k according to my simplistic
estimation, but this is taking Arm and x86 together). It's not the
end of the world, but in particular embedded users may want to get
rid of this. There's a reason after all (I assume) that Linux has
the option.

Jan

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message
  2020-01-17  8:39           ` Jan Beulich
@ 2020-01-17  8:53             ` Jürgen Groß
  0 siblings, 0 replies; 10+ messages in thread
From: Jürgen Groß @ 2020-01-17  8:53 UTC (permalink / raw)
  To: Jan Beulich, Andrew Cooper
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, IanJackson, xen-devel, Roger Pau Monné

On 17.01.20 09:39, Jan Beulich wrote:
> On 16.01.2020 19:54, Andrew Cooper wrote:
>> On 14/01/2020 16:12, Jan Beulich wrote:
>>> On 14.01.2020 17:00, Jürgen Groß wrote:
>>>> On 14.01.20 16:47, Jan Beulich wrote:
>>>>> On 09.01.2020 14:48, Juergen Gross wrote:
>>>>>> --- a/xen/Kconfig.debug
>>>>>> +++ b/xen/Kconfig.debug
>>>>>> @@ -81,6 +81,12 @@ config PERF_ARRAYS
>>>>>>    	---help---
>>>>>>    	  Enables software performance counter array histograms.
>>>>>>    
>>>>>> +config DEBUG_BUGVERBOSE
>>>>>> +	bool "Verbose BUG_ON messages"
>>>>>> +	default DEBUG
>>>>>> +	---help---
>>>>>> +	  In case a BUG_ON triggers additionally print the triggering
>>>>>> +	  condition on the console.
>>>>>>    
>>>>>>    config VERBOSE_DEBUG
>>>>> While I can see reasons to put this here, doing so means the option
>>>>> will be unavailable in non-EXPERT release builds. Is it intended to
>>>>> be that way?
>>>> I can move it either to xen/Kconfig or in Kconfig.debug out of the
>>>> "if expert" section if you want.
>>> I think this would be better, but give others a chance to voice
>>> opinions.
>>
>> TBH, I don't think anyone will be interested in not having the strings.
>> The change is what? a couple of hundred bytes?  That is a fraction of
>> the size of some functions we have.
> 
> Well, it's a couple thousand (about 7k according to my simplistic
> estimation, but this is taking Arm and x86 together). It's not the
> end of the world, but in particular embedded users may want to get
> rid of this. There's a reason after all (I assume) that Linux has
> the option.

The needed code churn is rather limited, so I think we should keep the
config option.


Juergen

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-17  8:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 13:48 [Xen-devel] [PATCH v2 0/2] xen: fix CONFIG_DEBUG_LOCKS Juergen Gross
2020-01-09 13:48 ` [Xen-devel] [PATCH v2 1/2] xen: add config option to include failing condition in BUG_ON() message Juergen Gross
2020-01-14 15:47   ` Jan Beulich
2020-01-14 16:00     ` Jürgen Groß
2020-01-14 16:12       ` Jan Beulich
2020-01-16 18:54         ` Andrew Cooper
2020-01-17  8:39           ` Jan Beulich
2020-01-17  8:53             ` Jürgen Groß
2020-01-09 13:48 ` [Xen-devel] [PATCH v2 2/2] xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG Juergen Gross
2020-01-09 14:13   ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).