<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_selftest.c, branch v3.14-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/trace/trace_selftest.c?h=v3.14-rc5</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/trace/trace_selftest.c?h=v3.14-rc5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-13T12:41:11Z</updated>
<entry>
<title>sched/deadline: Add latency tracing for SCHED_DEADLINE tasks</title>
<updated>2014-01-13T12:41:11Z</updated>
<author>
<name>Dario Faggioli</name>
<email>raistlin@linux.it</email>
</author>
<published>2013-11-07T13:43:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=af6ace764d03900524e9b1ac621a1c520ee49fc6'/>
<id>urn:sha1:af6ace764d03900524e9b1ac621a1c520ee49fc6</id>
<content type='text'>
It is very likely that systems that wants/needs to use the new
SCHED_DEADLINE policy also want to have the scheduling latency of
the -deadline tasks under control.

For this reason a new version of the scheduling wakeup latency,
called "wakeup_dl", is introduced.

As a consequence of applying this patch there will be three wakeup
latency tracer:

 * "wakeup", that deals with all tasks in the system;
 * "wakeup_rt", that deals with -rt and -deadline tasks only;
 * "wakeup_dl", that deals with -deadline tasks only.

Signed-off-by: Dario Faggioli &lt;raistlin@linux.it&gt;
Signed-off-by: Juri Lelli &lt;juri.lelli@gmail.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1383831828-15501-9-git-send-email-juri.lelli@gmail.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Do not run selftest if command line parameter is set</title>
<updated>2013-07-02T00:57:15Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-06-28T02:18:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1ed7c741fcd0c3d7d318e7c19813d89934b9296'/>
<id>urn:sha1:f1ed7c741fcd0c3d7d318e7c19813d89934b9296</id>
<content type='text'>
If the kernel command line ftrace filter parameters are set
(ftrace_filter or ftrace_notrace), force the function self test to
pass, with a warning why it was forced.

If the user adds a filter to the kernel command line, it is assumed
that they know what they are doing, and the self test should just not
run instead of failing (which disables function tracing) or clearing
the filter, as that will probably annoy the user.

If the user wants the selftest to run, the message will tell them why
it did not.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix bad parameter passed in branch selftest</title>
<updated>2013-05-29T20:00:03Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-05-29T19:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0184d50f9fd17658c232d6ee6d465a87f989d706'/>
<id>urn:sha1:0184d50f9fd17658c232d6ee6d465a87f989d706</id>
<content type='text'>
The branch selftest calls trace_test_buffer(), but with the new code
it expects the first parameter to be a pointer to a struct trace_buffer.
All self tests were changed but the branch selftest was missed.

This caused either a crash or failed test when the branch selftest was
enabled.

Link: http://lkml.kernel.org/r/20130529141333.GA24064@localhost

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix ftrace_dump()</title>
<updated>2013-03-15T23:24:56Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-15T17:10:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7fe70b579c9e3daba71635e31b6189394e7b79d3'/>
<id>urn:sha1:7fe70b579c9e3daba71635e31b6189394e7b79d3</id>
<content type='text'>
ftrace_dump() had a lot of issues. What ftrace_dump() does, is when
ftrace_dump_on_oops is set (via a kernel parameter or sysctl), it
will dump out the ftrace buffers to the console when either a oops,
panic, or a sysrq-z occurs.

This was written a long time ago when ftrace was fragile to recursion.
But it wasn't written well even for that.

There's a possible deadlock that can occur if a ftrace_dump() is happening
and an NMI triggers another dump. This is because it grabs a lock
before checking if the dump ran.

It also totally disables ftrace, and tracing for no good reasons.

As the ring_buffer now checks if it is read via a oops or NMI, where
there's a chance that the buffer gets corrupted, it will disable
itself. No need to have ftrace_dump() do the same.

ftrace_dump() is now cleaned up where it uses an atomic counter to
make sure only one dump happens at a time. A simple atomic_inc_return()
is enough that is needed for both other CPUs and NMIs. No need for
a spinlock, as if one CPU is running the dump, no other CPU needs
to do it too.

The tracing_on variable is turned off and not turned on. The original
code did this, but it wasn't pretty. By just disabling this variable
we get the result of not seeing traces that happen between crashes.

For sysrq-z, it doesn't get turned on, but the user can always write
a '1' to the tracing_on file. If they are using sysrq-z, then they should
know about tracing_on.

The new code is much easier to read and less error prone. No more
deadlock possibility when an NMI triggers here.

Reported-by: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: stable@vger.kernel.org
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
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>ftrace: Fix function tracing recursion self test</title>
<updated>2013-01-23T04:37:58Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-11-02T21:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9640388b63556b4cfecbb5aaf91a5c99d272f429'/>
<id>urn:sha1:9640388b63556b4cfecbb5aaf91a5c99d272f429</id>
<content type='text'>
The function tracing recursion self test should not crash
the machine if the resursion test fails. If it detects that
the function tracing is recursing when it should not be, then
bail, don't go into an infinite recursive loop.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix selftest function recursion accounting</title>
<updated>2013-01-23T04:35:11Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2013-01-23T04:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=05cbbf643b8eea1be21082c53cdb856d1dc6d765'/>
<id>urn:sha1:05cbbf643b8eea1be21082c53cdb856d1dc6d765</id>
<content type='text'>
The test that checks function recursion does things differently
if the arch does not support all ftrace features. But that really
doesn't make a difference with how the test runs, and either way
the count variable should be 2 at the end.

Currently the test wrongly fails for archs that don't support all
the ftrace features.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Move ARCH_SUPPORTS_FTRACE_SAVE_REGS in Kconfig</title>
<updated>2013-01-21T18:22:35Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>masami.hiramatsu.pt@hitachi.com</email>
</author>
<published>2012-09-28T08:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=06aeaaeabf69da4a3e86df532425640f51b01cef'/>
<id>urn:sha1:06aeaaeabf69da4a3e86df532425640f51b01cef</id>
<content type='text'>
Move SAVE_REGS support flag into Kconfig and rename
it to CONFIG_DYNAMIC_FTRACE_WITH_REGS. This also introduces
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS which indicates
the architecture depending part of ftrace has a code
that saves full registers.
On the other hand, CONFIG_DYNAMIC_FTRACE_WITH_REGS indicates
the code is enabled.

Link: http://lkml.kernel.org/r/20120928081516.3560.72534.stgit@ltc138.sdl.hitachi.co.jp

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Use irq_work for wake ups and remove *_nowake_*() functions</title>
<updated>2012-11-02T14:21:52Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-11-02T00:54:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0d5c6e1c19bab82fad4837108c2902f557d62a04'/>
<id>urn:sha1:0d5c6e1c19bab82fad4837108c2902f557d62a04</id>
<content type='text'>
Have the ring buffer commit function use the irq_work infrastructure to
wake up any waiters waiting on the ring buffer for new data. The irq_work
was created for such a purpose, where doing the actual wake up at the
time of adding data is too dangerous, as an event or function trace may
be in the midst of the work queue locks and cause deadlocks. The irq_work
will either delay the action to the next timer interrupt, or trigger an IPI
to itself forcing an interrupt to do the work (in a safe location).

With irq_work, all ring buffer commits can safely do wakeups, removing
the need for the ring buffer commit "nowake" variants, which were used
by events and function tracing. All commits can now safely use the
normal commit, and the "nowake" variants can be removed.

Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Make tracing_enabled be equal to tracing_on</title>
<updated>2012-11-02T14:21:50Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-05-11T18:25:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0fb9656d957d79dbe7ae155bb6533b1d465e4a50'/>
<id>urn:sha1:0fb9656d957d79dbe7ae155bb6533b1d465e4a50</id>
<content type='text'>
The tracing_enabled file has been deprecated as it never was able
to serve its purpose well. The tracing_on file has taken over.
Instead of having code to keep tracing_enabled, have the tracing_enabled
file just set tracing_on, and remove the tracing_enabled variable.

This allows us to remove the tracing_enabled file. The reason that
the remove is in a different change set and not removed here is
in case we find some lonely userspace tool that requires the file
to exist. Then the removal patch will get reverted, but this one
will not.

Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
