<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_functions.c, branch v3.14-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/trace/trace_functions.c?h=v3.14-rc5</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/trace/trace_functions.c?h=v3.14-rc5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-19T01:31:31Z</updated>
<entry>
<title>tracing: Add ref_data to function and fgraph tracer structs</title>
<updated>2013-07-19T01:31:31Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-07-18T18:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f768993394a8c0d3801033c11fd86ce8c88dcac'/>
<id>urn:sha1:8f768993394a8c0d3801033c11fd86ce8c88dcac</id>
<content type='text'>
The selftest for function and function graph tracers are defined as
__init, as they are only executed at boot up. The "tracer" structs
that are associated to those tracers are not setup as __init as they
are used after boot. To stop mismatch warnings, those structures
need to be annotated with __ref_data.

Currently, the tracer structures are defined to __read_mostly, as they
do not really change. But in the future they should be converted to
consts, but that will take a little work because they have a "next"
pointer that gets updated when they are registered. That will have to
wait till the next major release.

Link: http://lkml.kernel.org/r/1373596735.17876.84.camel@gandalf.local.home

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Reported-by: Chen Gang &lt;gang.chen@asianux.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Add function probe to trigger a ftrace dump of current CPU trace</title>
<updated>2013-06-11T22:38:48Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-04-30T23:00:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=90e3c03c3a09a7b176b3fe59d78f5d9755ac8e37'/>
<id>urn:sha1:90e3c03c3a09a7b176b3fe59d78f5d9755ac8e37</id>
<content type='text'>
Add the "cpudump" command to have the current CPU ftrace buffer dumped
to console if a function is hit. This is useful when debugging a
tripple fault, where you have an idea of a function that is called
just before the tripple fault occurs, and can tell ftrace to dump its
content out to the console before it continues.

This differs from the "dump" command as it only dumps the content of
the ring buffer for the currently executing CPU, and does not show
the contents of the other CPUs.

Format is:

  &lt;function&gt;:cpudump

echo 'bad_address:cpudump' &gt; /debug/tracing/set_ftrace_filter

To remove this:

echo '!bad_address:cpudump' &gt; /debug/tracing/set_ftrace_filter

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Add function probe to trigger a ftrace dump to console</title>
<updated>2013-06-11T22:38:46Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-04-30T19:46:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ad71d889b88055e61e3970a6744a271a51a94f42'/>
<id>urn:sha1:ad71d889b88055e61e3970a6744a271a51a94f42</id>
<content type='text'>
Add the "dump" command to have the ftrace buffer dumped to console if
a function is hit. This is useful when debugging a tripple fault,
where you have an idea of a function that is called just before the
tripple fault occurs, and can tell ftrace to dump its content out
to the console before it continues.

Format is:

  &lt;function&gt;:dump

echo 'bad_address:dump' &gt; /debug/tracing/set_ftrace_filter

To remove this:

echo '!bad_address:dump' &gt; /debug/tracing/set_ftrace_filter

Requested-by: Luis Claudio R. Goncalves &lt;lclaudio@uudg.org&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Add function probe to trigger stack traces</title>
<updated>2013-03-15T04:36:05Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-13T14:17:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dd42cd3ea96d687f15525c4f14fa582702db223f'/>
<id>urn:sha1:dd42cd3ea96d687f15525c4f14fa582702db223f</id>
<content type='text'>
Add a function probe that will cause a stack trace to be traced in
the ring buffer when the given function(s) are called.

format is:

 &lt;function&gt;:stacktrace[:&lt;count&gt;]

 echo 'schedule:stacktrace' &gt; /debug/tracing/set_ftrace_filter
 cat /debug/tracing/trace_pipe
     kworker/2:0-4329  [002] ...2  2933.558007: &lt;stack trace&gt;
 =&gt; kthread
 =&gt; ret_from_fork
          &lt;idle&gt;-0     [000] .N.2  2933.558019: &lt;stack trace&gt;
 =&gt; rest_init
 =&gt; start_kernel
 =&gt; x86_64_start_reservations
 =&gt; x86_64_start_kernel
     kworker/2:0-4329  [002] ...2  2933.558109: &lt;stack trace&gt;
 =&gt; kthread
 =&gt; ret_from_fork
[...]

This can be set to only trace a specific amount of times:

 echo 'schedule:stacktrace:3' &gt; /debug/tracing/set_ftrace_filter
 cat /debug/tracing/trace_pipe
           &lt;...&gt;-58    [003] ...2   841.801694: &lt;stack trace&gt;
 =&gt; kthread
 =&gt; ret_from_fork
          &lt;idle&gt;-0     [001] .N.2   841.801697: &lt;stack trace&gt;
 =&gt; start_secondary
           &lt;...&gt;-2059  [001] ...2   841.801736: &lt;stack trace&gt;
 =&gt; wait_for_common
 =&gt; wait_for_completion
 =&gt; flush_work
 =&gt; tty_flush_to_ldisc
 =&gt; input_available_p
 =&gt; n_tty_poll
 =&gt; tty_poll
 =&gt; do_select
 =&gt; core_sys_select
 =&gt; sys_select
 =&gt; system_call_fastpath

To remove these:

 echo '!schedule:stacktrace' &gt; /debug/tracing/set_ftrace_filter
 echo '!schedule:stacktrace:0' &gt; /debug/tracing/set_ftrace_filter

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Separate unlimited probes from count limited probes</title>
<updated>2013-03-15T04:35:59Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-09T13:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8380d24860e9d1659ab22896b86d7fe591c424fa'/>
<id>urn:sha1:8380d24860e9d1659ab22896b86d7fe591c424fa</id>
<content type='text'>
The function tracing probes that trigger traceon or traceoff can be
set to unlimited, or given a count of # of times to execute.

By separating these two types of probes, we can then use the dynamic
ftrace function filtering directly, and remove the brute force
"check if this function called is my probe" routines in ftrace.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Consolidate ftrace_trace_onoff_unreg() into callback</title>
<updated>2013-03-15T04:35:58Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-12T13:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8b8fa62c60e03a53c46324075a8dc25821741daa'/>
<id>urn:sha1:8b8fa62c60e03a53c46324075a8dc25821741daa</id>
<content type='text'>
The only thing ftrace_trace_onoff_unreg() does is to do a strcmp()
against the cmd parameter to determine what op to unregister. But
this compare is also done after the location that this function is
called (and returns). By moving the check for '!' to unregister after
the strcmp(), the callback function itself can just do the unregister
and we can get rid of the helper function.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Consolidate updating of count for traceon/off</title>
<updated>2013-03-15T04:35:58Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-09T13:36:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c31714328be90764e46716f31fb0bd6da44c305'/>
<id>urn:sha1:1c31714328be90764e46716f31fb0bd6da44c305</id>
<content type='text'>
Remove some duplicate code and replace it with a helper function.
This makes the code a it cleaner.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Consolidate max_tr into main trace_array structure</title>
<updated>2013-03-15T04:35:40Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>srostedt@redhat.com</email>
</author>
<published>2013-03-05T14:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=12883efb670c28dff57dcd7f4f995a1ffe153b2d'/>
<id>urn:sha1:12883efb670c28dff57dcd7f4f995a1ffe153b2d</id>
<content type='text'>
Currently, the way the latency tracers and snapshot feature works
is to have a separate trace_array called "max_tr" that holds the
snapshot buffer. For latency tracers, this snapshot buffer is used
to swap the running buffer with this buffer to save the current max
latency.

The only items needed for the max_tr is really just a copy of the buffer
itself, the per_cpu data pointers, the time_start timestamp that states
when the max latency was triggered, and the cpu that the max latency
was triggered on. All other fields in trace_array are unused by the
max_tr, making the max_tr mostly bloat.

This change removes the max_tr completely, and adds a new structure
called trace_buffer, that holds the buffer pointer, the per_cpu data
pointers, the time_start timestamp, and the cpu where the latency occurred.

The trace_array, now has two trace_buffers, one for the normal trace and
one for the max trace or snapshot. By doing this, not only do we remove
the bloat from the max_trace but the instances of traces can now use
their own snapshot feature and not have just the top level global_trace have
the snapshot feature and latency tracers for itself.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Replace the static global per_cpu arrays with allocated per_cpu</title>
<updated>2013-03-15T04:34:43Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-08-06T20:24:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a7603ff4b5f7e26e67af82a4c3d05eeeb8d7b160'/>
<id>urn:sha1:a7603ff4b5f7e26e67af82a4c3d05eeeb8d7b160</id>
<content type='text'>
The global and max-tr currently use static per_cpu arrays for the CPU data
descriptors. But in order to get new allocated trace_arrays, they need to
be allocated per_cpu arrays. Instead of using the static arrays, switch
the global and max-tr to use allocated data.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix unsigned int compare of zero in recursion check</title>
<updated>2013-01-24T12:52:34Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2013-01-24T12:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d41032a83b4683481cadff84bbf8e0eafeaba830'/>
<id>urn:sha1:d41032a83b4683481cadff84bbf8e0eafeaba830</id>
<content type='text'>
Dan's smatch found a compare bug with the result of the
trace_test_and_set_recursion() and comparing to less than
zero. If the function fails, it returns -1, but was saved in
an unsigned int, which will never be less than zero and will
ignore the result of the test if a recursion did happen.

Luckily this is the last of the recursion tests, as the
infrastructure of ftrace would catch recursions before it
got here, except for some few exceptions.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
