Lai Jiangshan 74e7ff8c50 tracing: Fix missing function_graph events when we splice_read from trace_pipe
About a half events are missing when we splice_read
from trace_pipe. They are unexpectedly consumed because we ignore
the TRACE_TYPE_NO_CONSUME return value used by the function graph
tracer when it needs to consume the events by itself to walk on
the ring buffer.

The same problem appears with ftrace_dump()

Example of an output before this patch:

1)               |      ktime_get_real() {
1)   2.846 us    |          read_hpet();
1)   4.558 us    |        }
1)   6.195 us    |      }

After this patch:

0)               |      ktime_get_real() {
0)               |        getnstimeofday() {
0)   1.960 us    |          read_hpet();
0)   3.597 us    |        }
0)   5.196 us    |      }

The fix also applies on 2.6.30

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: stable@kernel.org
LKML-Reference: <4A6EEC52.90704@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
2009-07-28 23:17:23 +02:00
..
2009-07-12 12:22:34 -07:00
2009-06-24 00:02:38 -04:00
2009-06-24 00:02:38 -04:00
2009-07-08 09:31:56 -07:00
2009-06-16 19:47:48 -07:00
2009-07-10 17:32:55 +02:00
2009-05-15 07:56:24 -05:00
2009-07-08 09:31:56 -07:00
2009-07-27 12:15:46 -07:00
2009-01-14 18:09:02 +01:00
2009-06-18 13:03:56 -07:00
2009-06-18 13:03:55 -07:00
2009-03-30 22:05:16 +10:30
2009-06-16 19:47:48 -07:00
2009-06-15 21:30:23 -07:00
2009-06-18 13:03:55 -07:00
2009-04-14 17:17:16 +02:00