]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix ent_size in trace output
authorSteven Rostedt <srostedt@redhat.com>
Tue, 27 Mar 2012 14:43:28 +0000 (10:43 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 27 Mar 2012 16:05:44 +0000 (12:05 -0400)
commit4af6a3c24cd901d9c15f9be1af98fd88066ac262
treea785d2b0757cacc15cd02e9eb6da3210c79a8aea
parentf1bbc112cbe05779a5e942065adc67f5e53e43e0
tracing: Fix ent_size in trace output

When reading the trace file, the records of each of the per_cpu buffers
are examined to find the next event to print out. At the point of looking
at the event, the size of the event is recorded. But if the first event is
chosen, the other events in the other CPU buffers will reset the event size
that is stored in the iterator descriptor, causing the event size passed to
the output functions to be incorrect.

In most cases this is not a problem, but for the case of stack traces, it
is. With the change to the stack tracing to record a dynamic number of
back traces, the output depends on the size of the entry instead of the
fixed 8 back traces. When the entry size is not correct, the back traces
would not be fully printed.

Note, reading from the per-cpu trace files were not affected.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c