ftrace: limit use of check pages
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 22 May 2008 04:22:16 +0000 (00:22 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 26 May 2008 20:39:45 +0000 (22:39 +0200)
commit19384c0314342222b18d4c7f09cdce1ca74dfd2a
tree9312acd07471cb89f2090f01e3259eab40de3eea
parentc6531cce6e6e4b99bcda46b6268d6f2d9e30aea4
ftrace: limit use of check pages

The check_pages function is called often enough that it can cause problems
with trace outputs or even bringing the system to a halt.

This patch limits the check_pages to the places that are most likely to
have problems. The check is made at the flip between the global array and
the max save array, as well as when the size of the buffers changes and
the self tests.

This patch also removes the BUG_ON from check_pages and replaces it with
a WARN_ON and disabling of the tracer.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: pq@iki.fi
Cc: proski@gnu.org
Cc: sandmann@redhat.com
Cc: a.p.zijlstra@chello.nl
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/trace/trace.c
kernel/trace/trace_selftest.c