mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>, Pekka Paalanen <pq@iki.fi>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 1/1] ftrace: do not update max buffer with no users
Date: Wed, 12 Nov 2008 18:37:45 -0800	[thread overview]
Message-ID: <20081112183745.07af124d.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081113013247.974941878@goodmis.org>

On Wed, 12 Nov 2008 20:30:42 -0500 Steven Rostedt <rostedt@goodmis.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.

  reply	other threads:[~2008-11-13  2:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13  1:30 [PATCH 0/1] ftrace updates for 2.6.28 Steven Rostedt
2008-11-13  1:30 ` [PATCH 1/1] ftrace: do not update max buffer with no users Steven Rostedt
2008-11-13  2:37   ` Andrew Morton [this message]
2008-11-13  2:43     ` Steven Rostedt
2008-11-13  8:36       ` Ingo Molnar
2008-11-13  2:47     ` Steven Rostedt
2008-11-13  8:39       ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081112183745.07af124d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pq@iki.fi \
    --cc=rostedt@goodmis.org \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®