<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/kernel/trace/ftrace.c, branch linux-2.6.33.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-06-23T22:28:33Z</updated>
<entry>
<title>ftrace: Only update the function code on write to filter files</title>
<updated>2011-06-23T22:28:33Z</updated>
<author>
<name>Steven Rostedt</name>
</author>
<published>2011-04-30T02:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7116a3c50456ac9634ce305fd51ad24fcbf13e58'/>
<id>urn:sha1:7116a3c50456ac9634ce305fd51ad24fcbf13e58</id>
<content type='text'>
commit 058e297d34a404caaa5ed277de15698d8dc43000 upstream.

If function tracing is enabled, a read of the filter files will
cause the call to stop_machine to update the function trace sites.
It should only call stop_machine on write.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ftrace: Fix memory leak with function graph and cpu hotplug</title>
<updated>2011-03-21T19:45:37Z</updated>
<author>
<name>Steven Rostedt</name>
</author>
<published>2011-02-11T02:26:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0e080d125f14ce2cde9a2ab50b2c2d0fb5609df'/>
<id>urn:sha1:b0e080d125f14ce2cde9a2ab50b2c2d0fb5609df</id>
<content type='text'>
commit 868baf07b1a259f5f3803c1dc2777b6c358f83cf upstream.

When the fuction graph tracer starts, it needs to make a special
stack for each task to save the real return values of the tasks.
All running tasks have this stack created, as well as any new
tasks.

On CPU hot plug, the new idle task will allocate a stack as well
when init_idle() is called. The problem is that cpu hotplug does
not create a new idle_task. Instead it uses the idle task that
existed when the cpu went down.

ftrace_graph_init_task() will add a new ret_stack to the task
that is given to it. Because a clone will make the task
have a stack of its parent it does not check if the task's
ret_stack is already NULL or not. When the CPU hotplug code
starts a CPU up again, it will allocate a new stack even
though one already existed for it.

The solution is to treat the idle_task specially. In fact, the
function_graph code already does, just not at init_idle().
Instead of using the ftrace_graph_init_task() for the idle task,
which that function expects the task to be a clone, have a
separate ftrace_graph_init_idle_task(). Also, we will create a
per_cpu ret_stack that is used by the idle task. When we call
ftrace_graph_init_idle_task() it will check if the idle task's
ret_stack is NULL, if it is, then it will assign it the per_cpu
ret_stack.

Reported-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Suggested-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>function-graph: Init curr_ret_stack with ret_stack</title>
<updated>2010-04-01T23:01:16Z</updated>
<author>
<name>Steven Rostedt</name>
</author>
<published>2010-03-13T00:41:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a86a83770fe3cc858f91b0ae6406477dc8d0bf17'/>
<id>urn:sha1:a86a83770fe3cc858f91b0ae6406477dc8d0bf17</id>
<content type='text'>
commit ea14eb714041d40fcc5180b5a586034503650149 upstream.

If the graph tracer is active, and a task is forked but the allocating of
the processes graph stack fails, it can cause crash later on.

This is due to the temporary stack being NULL, but the curr_ret_stack
variable is copied from the parent. If it is not -1, then in
ftrace_graph_probe_sched_switch() the following:

	for (index = next-&gt;curr_ret_stack; index &gt;= 0; index--)
		next-&gt;ret_stack[index].calltime += timestamp;

Will cause a kernel OOPS.

Found with Li Zefan's ftrace_stress_test.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ftrace: Fix MATCH_END_ONLY function filter</title>
<updated>2010-01-15T03:38:03Z</updated>
<author>
<name>Li Zefan</name>
</author>
<published>2010-01-14T02:53:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=751e9983ee276cb150e8812b1d995f6035a63878'/>
<id>urn:sha1:751e9983ee276cb150e8812b1d995f6035a63878</id>
<content type='text'>
For '*foo' pattern, we should allow any string ending with
'foo', but ftrace filter incorrectly disallows strings
like bar_foo_foo:

  # echo '*io' &gt; set_ftrace_filter
  # cat set_ftrace_filter | grep 'req_bio_endio'
  # cat available_filter_functions | grep 'req_bio_endio'
  req_bio_endio

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
LKML-Reference: &lt;4B4E870E.6060607@cn.fujitsu.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>function-graph: Allow writing the same val to set_graph_function</title>
<updated>2009-12-13T17:37:26Z</updated>
<author>
<name>Li Zefan</name>
</author>
<published>2009-12-08T03:15:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91baf6285be7282cfa487de92f836c50749dffb9'/>
<id>urn:sha1:91baf6285be7282cfa487de92f836c50749dffb9</id>
<content type='text'>
# echo 'do_open' &gt; set_graph_function
 # echo 'do_open' &gt;&gt; set_graph_function
 bash: echo: write error: Invalid argument

Make it valid to write the same value to set_graph_function,
which is consistent with set_ftrace_filter interface.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-reference: &lt;4B1DC4E1.1060303@cn.fujitsu.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>ftrace: Call trace_parser_clear() properly</title>
<updated>2009-12-13T17:37:26Z</updated>
<author>
<name>Li Zefan</name>
</author>
<published>2009-12-08T03:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=313254a9400d388b46150c0f355e216418a2f598'/>
<id>urn:sha1:313254a9400d388b46150c0f355e216418a2f598</id>
<content type='text'>
I found a weird behavior:

  # echo 'fuse:*' &gt; set_ftrace_filter
  bash: echo: write error: Invalid argument
  # cat set_ftrace_filter
  fuse_dev_fasync
  fuse_dev_poll
  fuse_copy_do

We should call trace_parser_clear() no matter ftrace_process_regex()
returns 0 or -errno, otherwise we will actually take the unaccepted
records from ftrace_regex_release().

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;4B1DC4D2.3000406@cn.fujitsu.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>ftrace: Return EINVAL when writing invalid val to set_ftrace_filter</title>
<updated>2009-12-13T17:37:25Z</updated>
<author>
<name>Li Zefan</name>
</author>
<published>2009-12-08T03:15:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=311d16da575f53c3367099579736c1d233efe0dc'/>
<id>urn:sha1:311d16da575f53c3367099579736c1d233efe0dc</id>
<content type='text'>
Currently it doesn't warn user on invald value:

 # echo nonexist_symbol &gt; set_ftrace_filter
or:
 # echo 'nonexist_symbol:mod:fuse' &gt; set_ftrace_filter

Better make it return failure.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;4B1DC4BF.2070003@cn.fujitsu.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-12-05T17:53:36Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-12-05T17:53:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96fa2b508d2d3fe040cf4ef2fffb955f0a537ea1'/>
<id>urn:sha1:96fa2b508d2d3fe040cf4ef2fffb955f0a537ea1</id>
<content type='text'>
* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (40 commits)
  tracing: Separate raw syscall from syscall tracer
  ring-buffer-benchmark: Add parameters to set produce/consumer priorities
  tracing, function tracer: Clean up strstrip() usage
  ring-buffer benchmark: Run producer/consumer threads at nice +19
  tracing: Remove the stale include/trace/power.h
  tracing: Only print objcopy version warning once from recordmcount
  tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
  ring-buffer: Move access to commit_page up into function used
  tracing: do not disable interrupts for trace_clock_local
  ring-buffer: Add multiple iterations between benchmark timestamps
  kprobes: Sanitize struct kretprobe_instance allocations
  tracing: Fix to use __always_unused attribute
  compiler: Introduce __always_unused
  tracing: Exit with error if a weak function is used in recordmcount.pl
  tracing: Move conditional into update_funcs() in recordmcount.pl
  tracing: Add regex for weak functions in recordmcount.pl
  tracing: Move mcount section search to front of loop in recordmcount.pl
  tracing: Fix objcopy revision check in recordmcount.pl
  tracing: Check absolute path of input file in recordmcount.pl
  tracing: Correct the check for number of arguments in recordmcount.pl
  ...
</content>
</entry>
<entry>
<title>tracing, function tracer: Clean up strstrip() usage</title>
<updated>2009-11-23T10:04:07Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2009-11-23T10:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=457dc928f586f3f4b930206965e6db270034e97e'/>
<id>urn:sha1:457dc928f586f3f4b930206965e6db270034e97e</id>
<content type='text'>
Clean up strstrip() usage - which also addresses this build warning:

  kernel/trace/ftrace.c: In function 'ftrace_pid_write':
  kernel/trace/ftrace.c:3004: warning: ignoring return value of 'strstrip', declared with attribute warn_unused_result

Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used</title>
<updated>2009-11-17T16:05:49Z</updated>
<author>
<name>Lai Jiangshan</name>
</author>
<published>2009-11-05T03:16:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6060f46819f313d34a8c8151390cda509c23389'/>
<id>urn:sha1:f6060f46819f313d34a8c8151390cda509c23389</id>
<content type='text'>
Prevent build warning when CONFIG_FUNCTION_GRAPH_TRACER is not set.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
LKML-Reference: &lt;4AF24381.5060307@cn.fujitsu.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
