[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081112183745.07af124d.akpm@linux-foundation.org>
Date: Wed, 12 Nov 2008 18:37:45 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Pekka Paalanen <pq@....fi>,
Frederic Weisbecker <fweisbec@...il.com>,
Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 1/1] ftrace: do not update max buffer with no users
On Wed, 12 Nov 2008 20:30:42 -0500 Steven Rostedt <rostedt@...dmis.org> wrote:
> Impact: only use max latency buffer when a user is configured
>
> Pekka reported a bug with the resizing of the buffers when only the
> MMIO tracer was configured. The issue was, to save memory, the max
> latency trace buffer was only initialized if a tracer that uses it
> is configured in.
>
> What happened was that the max latency buffer was never initialized
> when only the MMIO tracer was configurued. The MMIO tracer does not
> use the max tracer, which kept it from being initialized. But the
> resize code still tried to resize the max latency buffers, but because
> they were never allocated, the resize code was passed a NULL pointer.
>
> This patch puts all of the max_tr (max tracer buffer) inside the
> TRACER_MAX_TRACE config, to prevent any more errors in its use when
> not configured.
>
> +#ifdef CONFIG_TRACER_MAX_TRACE
> +#endif /* CONFIG_TRACER_MAX_TRACE */
> +#ifdef CONFIG_TRACER_MAX_TRACE
> +#endif
> +#ifdef CONFIG_TRACER_MAX_TRACE
> +#endif
> +#ifdef CONFIG_TRACER_MAX_TRACE
> +#endif
> +#ifdef CONFIG_TRACER_MAX_TRACE
> +#endif
> +#ifdef CONFIG_TRACER_MAX_TRACE
> +#endif
> +#ifdef CONFIG_TRACER_MAX_TRACE
> +#endif
hey.
This sort of thing:
+#ifdef CONFIG_TRACER_MAX_TRACE
if (current_trace && current_trace->print_max)
iter->tr = &max_tr;
else
+#endif
iter->tr = inode->i_private;
is particularly regrettable.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists