Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1369873 > unrolled thread

[tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s

Started bySedat Dilek <sedat.dilek@gmail.com>
First post2016-04-02 08:00 +0200
Last post2016-04-04 17:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s Sedat Dilek <sedat.dilek@gmail.com> - 2016-04-02 08:00 +0200
    Re: [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s Thomas Gleixner <tglx@linutronix.de> - 2016-04-02 13:20 +0200
      Re: [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s Sedat Dilek <sedat.dilek@gmail.com> - 2016-04-04 17:40 +0200

#1369873 — [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s

FromSedat Dilek <sedat.dilek@gmail.com>
Date2016-04-02 08:00 +0200
Subject[tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s
Message-ID<rjmLf-7Gb-1@gated-at.bofh.it>
Hi,

I was looking through tip Git tree...

Why didn't you use...

+ IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) ? " DEBUG_PAGEALLOC" : "",

...instead of...

+ debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",

...for consistency reasons?

Regards,
- Sedat -

[1] http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=x86/debug&id=8fad7ec51e1b9e262e0bdd34e800ac1ea5e84dec

P.S.: From [1] "x86/dumpstack: Combine some printk()s"

--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -260,19 +260,12 @@ int __die(const char *str, struct pt_regs *regs, long err)
unsigned long sp;
#endif
printk(KERN_DEFAULT
- "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
-#ifdef CONFIG_PREEMPT
- printk("PREEMPT ");
-#endif
-#ifdef CONFIG_SMP
- printk("SMP ");
-#endif
- if (debug_pagealloc_enabled())
- printk("DEBUG_PAGEALLOC ");
-#ifdef CONFIG_KASAN
- printk("KASAN");
-#endif
- printk("\n");
+ "%s: %04lx [#%d]%s%s%s%s\n", str, err & 0xffff, ++die_counter,
+ IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
+ IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
+ debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
+ IS_ENABLED(CONFIG_KASAN) ? " KASAN" : "");
+
if (notify_die(DIE_OOPS, str, regs, err,
current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP)
return 1;

[toc] | [next] | [standalone]


#1369922

FromThomas Gleixner <tglx@linutronix.de>
Date2016-04-02 13:20 +0200
Message-ID<rjrKW-2UX-9@gated-at.bofh.it>
In reply to#1369873
On Sat, 2 Apr 2016, Sedat Dilek wrote:

> Hi,
> 
> I was looking through tip Git tree...
> 
> Why didn't you use...
> 
> + IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) ? " DEBUG_PAGEALLOC" : "",
> 
> ...instead of...
> 
> + debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
> 
> ...for consistency reasons?

Hint: Lookup the implementation of debug_pagealloc_enabled()

Thanks,

	tglx

[toc] | [prev] | [next] | [standalone]


#1370704

FromSedat Dilek <sedat.dilek@gmail.com>
Date2016-04-04 17:40 +0200
Message-ID<rkeLE-57u-33@gated-at.bofh.it>
In reply to#1369922
On Sat, Apr 2, 2016 at 1:12 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Sat, 2 Apr 2016, Sedat Dilek wrote:
>
>> Hi,
>>
>> I was looking through tip Git tree...
>>
>> Why didn't you use...
>>
>> + IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) ? " DEBUG_PAGEALLOC" : "",
>>
>> ...instead of...
>>
>> + debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
>>
>> ...for consistency reasons?
>
> Hint: Lookup the implementation of debug_pagealloc_enabled()
>

I did not look and simply trust you.

- sed@ -

> Thanks,
>
>         tglx

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web