lkml.org 
[lkml]   [2010]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] Dynamic Debug: Introduce global fake module param module.ddebug - V4
On Fri, Sep 24, 2010 at 02:28:28PM +0200, Thomas Renninger wrote:
> Dynamic Debug allows enabling of pr_debug and dev_dbg messages at runtime.
> This is controlled via /sys/kernel/debug/dynamic_debug/control.
> One major drawback is that the whole initialization of a module cannot be
> tracked, because ddebug is only aware of debug strings of loaded modules.
> But this is the most interesting part...
>
> This patch introduces a fake module parameter module.ddebug(not shown in
> /sys/module/*/parameters, thus it does not use any resources/memory).
>
> If a module passes ddebug as a module parameter (e.g. via module.ddebug
> kernel boot param or via "modprobe module ddebug"), all debug strings of this
> module get activated by issuing "module module_name +p" internally
> (not via sysfs) when the module gets loaded.
>
> Possible enhancements for the future if ddebug might get extended with
> further flags:
> module.ddebug=flags
> Then module.ddebug="p" would be the same as module.ddebug, but if there
> is a "x" ddebug flag added, one could pass:
> module.ddebug="xp"
> which would result in such a dynamic debug query:
> module module_name +xp
>
> Modules must not use "ddebug" as module parameter or it will get ignored.
> If it's tried, a warning will show up at module load time that it will get
> ignored (only works for not built-in modules).
>
> Tested with (additional added pr_debug messages):
> options hp-wmi ddebug
> in modprobe.conf
> -> works and pr_debug messages issued at module initialization time show
> up. Also "p" flag gets set for the whole hp-wmi module:
> grep hp-wmi /sys/../dynamic_debug/control
> also tested with compiled-in modules, e.g. pnp.ddebug and an additional
> patch later in the patch series which instruments pnp code to work with ddebug.

I don't think you actually built this patch, as it dies:
kernel/params.c: In function ‘parse_one’:
kernel/params.c:114:2: error: ‘tmp’ undeclared (first use in this function)
kernel/params.c:114:2: note: each undeclared identifier is reported only once for each function it appears in
kernel/params.c: In function ‘destroy_params’:
kernel/params.c:726:8: warning: unused variable ‘tmp’

I've dropped all 4 from my queue now, care to resend when they work
properly?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-10-06 23:25    [W:0.777 / U:2.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site