lkml.org 
[lkml]   [2018]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] printk: move dump stack related code to lib/dump_stack.c
On (02/13/18 15:28), Dave Young wrote:
>
> dump_stack related stuff should belong to lib/dump_stack.c thus move them
> there. Also conditionally compile lib/dump_stack.c since dump_stack code
> does not make sense if printk is disabled.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> Suggested-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>


The patch also saves us some additional memory on !PRINTK configs.
For example things like this

if (kobj->state_initialized) {
/* do not error out as sometimes we can recover */
printk(KERN_ERR "kobject (%p): tried to init an initialized "
"object, something is seriously wrong.\n", kobj);
dump_stack();
}

now we won't have that dump_stack() call, which does not seems to be doing
anything useful anyway when printk() is not available.

-ss

\
 
 \ /
  Last update: 2018-02-13 09:36    [W:0.039 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site