Re: [PATCH] tracing: add trace console
From: Steven Rostedt
Date: Wed Nov 16 2011 - 12:05:57 EST
On Wed, 2011-11-16 at 12:00 -0500, Steven Rostedt wrote:
> diff --git a/kernel/printk.c b/kernel/printk.c
> index 1455a0d..4b8445a 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -542,6 +542,7 @@ MODULE_PARM_DESC(ignore_loglevel, "ignore loglevel setting, to"
> static void _call_console_drivers(unsigned start,
> unsigned end, int msg_log_level)
> {
> + trace_console(&LOG_BUF(start), end - start);
And since we don't want to trace when end == start, we can use
TRACE_EVENT_CONDITION() and have cond be: len > 0. (where len is the
parameter that takes the end - start.)
This will keep the branch to test len > 0 inside the tracepoint, and it
wont affect the logic when tracing is disabled.
-- Steve
> if ((msg_log_level < console_loglevel || ignore_loglevel) &&
> console_drivers && start != end) {
> if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/