<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_functions.c, branch v3.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-04-30T12:40:05Z</updated>
<entry>
<title>tracing: Remove mock up poll wait function</title>
<updated>2014-04-30T12:40:05Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-04-29T21:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b1169cc69ba96b124df820904a6d3eb775491d7f'/>
<id>urn:sha1:b1169cc69ba96b124df820904a6d3eb775491d7f</id>
<content type='text'>
Now that the ring buffer has a built in way to wake up readers
when there's data, using irq_work such that it is safe to do it
in any context. But it was still using the old "poor man's"
wait polling that checks every 1/10 of a second to see if it
should wake up a waiter. This makes the latency for a wake up
excruciatingly long. No need to do that anymore.

Completely remove the different wait_poll types from the tracers
and have them all use the default one now.

Reported-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Remove global function list and call function directly</title>
<updated>2014-04-21T17:59:25Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-01-10T22:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4104d326b670c2b66f575d2004daa28b2d1b4c8d'/>
<id>urn:sha1:4104d326b670c2b66f575d2004daa28b2d1b4c8d</id>
<content type='text'>
Instead of having a list of global functions that are called,
as only one global function is allow to be enabled at a time, there's
no reason to have a list.

Instead, simply have all the users of the global ops, use the global ops
directly, instead of registering their own ftrace_ops. Just switch what
function is used before enabling the function tracer.

This removes a lot of code as well as the complexity involved with it.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Do not try to recreated toplevel set_ftrace_* files</title>
<updated>2014-04-16T23:21:53Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-04-16T23:21:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d6c97c55984b3b991400692f9e8568a702b93c0'/>
<id>urn:sha1:5d6c97c55984b3b991400692f9e8568a702b93c0</id>
<content type='text'>
With the restructing of the function tracer working with instances, the
"top level" buffer is a bit special, as the function tracing is mapped
to the same set of filters. This is done by using a "global_ops" descriptor
and having the "set_ftrace_filter" and "set_ftrace_notrace" map to it.

When an instance is created, it creates the same files but its for the
local instance and not the global_ops.

The issues is that the local instance creation shares some code with
the global instance one and we end up trying to create th top level
"set_ftrace_*" files twice, and on boot up, we get an error like this:

 Could not create debugfs 'set_ftrace_filter' entry
 Could not create debugfs 'set_ftrace_notrace' entry

The reason they failed to be created was because they were created
twice, and the second time gives this error as you can not create the
same file twice.

Reported-by: Borislav Petkov &lt;bp@alien8.de&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Allow for function tracing instance to filter functions</title>
<updated>2014-02-20T17:29:07Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-01-10T21:17:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=591dffdade9f07692a7dd3ed16830ec24e901ece'/>
<id>urn:sha1:591dffdade9f07692a7dd3ed16830ec24e901ece</id>
<content type='text'>
Create a "set_ftrace_filter" and "set_ftrace_notrace" files in the instance
directories to let users filter of functions to trace for the given instance.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Allow instances to use function tracing</title>
<updated>2014-02-20T17:13:18Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-11-08T01:08:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f20a580627f43e73e4e57cb37e3864080ca06088'/>
<id>urn:sha1:f20a580627f43e73e4e57cb37e3864080ca06088</id>
<content type='text'>
Allow instances (sub-buffers) to enable function tracing.
Each instance will have its own function tracing capability.
For now, instances will not have function stack tracing, or will
they be able to pick and choose what functions they can trace.

Picking and choosing their own functions will come later.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Pass trace_array to set_flag callback</title>
<updated>2014-02-20T17:13:07Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-01-10T16:13:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c1a49aedb73fb2f15aaa32ad9e2e1c4289f45cb'/>
<id>urn:sha1:8c1a49aedb73fb2f15aaa32ad9e2e1c4289f45cb</id>
<content type='text'>
As options (flags) may affect instances instead of being global
the set_flag() callbacks need to receive the trace_array descriptor
of the instance they will be modifying.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<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.shady.money/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.shady.money/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.shady.money/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.shady.money/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>
</feed>
