Li Zefan 694ce0a544 ftrace: Don't manipulate @pos in t_start()
It's rather confusing that in t_start(), in some cases @pos is
incremented, and in some cases it's decremented and then incremented.

This patch rewrites t_start() in a much more general way.

Thus we fix a bug that if ftrace_filtered == 1, functions have tracer
hooks won't be printed, because the branch is always unreachable:

static void *t_start(...)
{
	...
	if (!p)
		return t_hash_start(m, pos);
	return p;
}

Before:
  # echo 'sys_open' > /mnt/tracing/set_ftrace_filter
  # echo 'sys_write:traceon:4' >> /mnt/tracing/set_ftrace_filter
  sys_open

After:
  # echo 'sys_open' > /mnt/tracing/set_ftrace_filter
  # echo 'sys_write:traceon:4' >> /mnt/tracing/set_ftrace_filter
  sys_open
  sys_write:traceon:count=4

Reviewed-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A41874B.4090507@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-06-24 11:02:53 +02:00
..
2008-10-16 11:21:30 -07:00
2009-05-20 10:34:32 +02:00
2009-06-16 19:47:48 -07:00
2008-07-28 14:37:38 +02:00
2009-05-15 07:56:24 -05:00
2009-06-18 13:03:54 -07:00
2009-06-18 13:03:57 -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-06-18 13:03:55 -07:00
2008-09-02 19:21:40 -07:00
2009-03-30 22:05:16 +10:30
2009-06-16 19:47:48 -07:00
2009-06-18 13:03:54 -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