<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/trace/trace.c, branch v3.0.50</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.0.50</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.0.50'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-07-16T15:47:51Z</updated>
<entry>
<title>tracing: change CPU ring buffer state from tracing_cpumask</title>
<updated>2012-07-16T15:47:51Z</updated>
<author>
<name>Vaibhav Nagarnaik</name>
<email>vnagarnaik@google.com</email>
</author>
<published>2012-05-04T01:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f437e75ac267fa886bcbe7ab40d8f1ba1de1c865'/>
<id>urn:sha1:f437e75ac267fa886bcbe7ab40d8f1ba1de1c865</id>
<content type='text'>
commit 71babb2705e2203a64c27ede13ae3508a0d2c16c upstream.

According to Documentation/trace/ftrace.txt:

tracing_cpumask:

        This is a mask that lets the user only trace
        on specified CPUS. The format is a hex string
        representing the CPUS.

The tracing_cpumask currently doesn't affect the tracing state of
per-CPU ring buffers.

This patch enables/disables CPU recording as its corresponding bit in
tracing_cpumask is set/unset.

Link: http://lkml.kernel.org/r/1336096792-25373-3-git-send-email-vnagarnaik@google.com

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Laurent Chavey &lt;chavey@google.com&gt;
Cc: Justin Teravest &lt;teravest@google.com&gt;
Cc: David Sharp &lt;dhsharp@google.com&gt;
Signed-off-by: Vaibhav Nagarnaik &lt;vnagarnaik@google.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tracing: Fix returning of duplicate data after EOF in trace_pipe_raw</title>
<updated>2011-11-11T17:35:53Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-10-14T14:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=12cb3e734a5616ea0057aee938c553ff6ccbdfbd'/>
<id>urn:sha1:12cb3e734a5616ea0057aee938c553ff6ccbdfbd</id>
<content type='text'>
commit 436fc280261dcfce5af38f08b89287750dc91cd2 upstream.

The trace_pipe_raw handler holds a cached page from the time the file
is opened to the time it is closed. The cached page is used to handle
the case of the user space buffer being smaller than what was read from
the ring buffer. The left over buffer is held in the cache so that the
next read will continue where the data left off.

After EOF is returned (no more data in the buffer), the index of
the cached page is set to zero. If a user app reads the page again
after EOF, the check in the buffer will see that the cached page
is less than page size and will return the cached page again. This
will cause reading the trace_pipe_raw again after EOF to return
duplicate data, making the output look like the time went backwards
but instead data is just repeated.

The fix is to not reset the index right after all data is read
from the cache, but to reset it after all data is read and more
data exists in the ring buffer.

Reported-by: Jeremy Eder &lt;jeder@redhat.com&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>Merge commit 'v2.6.39-rc7' into perf/core</title>
<updated>2011-05-10T15:05:45Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2011-05-10T15:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=932fed4e2e42c3d730c01bb63b1c4f812c533d5b'/>
<id>urn:sha1:932fed4e2e42c3d730c01bb63b1c4f812c533d5b</id>
<content type='text'>
Merge reason: pull in the latest fixes.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Regression: partial revert "tracing: Remove lock_depth from event entry"</title>
<updated>2011-05-06T20:20:59Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@linux.intel.com</email>
</author>
<published>2011-05-06T03:55:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a3a4a5acd3bd2f6f1e102e1f1b9d2e2bb320a7fd'/>
<id>urn:sha1:a3a4a5acd3bd2f6f1e102e1f1b9d2e2bb320a7fd</id>
<content type='text'>
This partially reverts commit e6e1e2593592a8f6f6380496655d8c6f67431266.

That commit changed the structure layout of the trace structure, which
in turn broke PowerTOP (1.9x generation) quite badly.

I appreciate not wanting to expose the variable in question, and
PowerTOP was not using it, so I've replaced the variable with just a
padding field - that way if in the future a new field is needed it can
just use this padding field.

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core</title>
<updated>2011-04-27T08:40:21Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2011-04-27T08:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=32673822e440eb92eb334631eb0a199d0c532d13'/>
<id>urn:sha1:32673822e440eb92eb334631eb0a199d0c532d13</id>
<content type='text'>
Conflicts:
	include/linux/perf_event.h

Merge reason: pick up the latest jump-label enhancements, they are cooked ready.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: Avoid soft lockup in trace_pipe</title>
<updated>2011-04-04T16:18:24Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2011-03-25T11:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ee5e51f51be755830f57445e268ba50e88ccbdbb'/>
<id>urn:sha1:ee5e51f51be755830f57445e268ba50e88ccbdbb</id>
<content type='text'>
running following commands:

  # enable the binary option
  echo 1 &gt; ./options/bin
  # disable context info option
  echo 0 &gt; ./options/context-info
  # tracing only events
  echo 1 &gt; ./events/enable
  cat trace_pipe

plus forcing system to generate many tracing events,
is causing lockup (in NON preemptive kernels) inside
tracing_read_pipe function.

The issue is also easily reproduced by running ltp stress test.
(ftrace_stress_test.sh)

The reasons are:
 - bin/hex/raw output functions for events are set to
   trace_nop_print function, which prints nothing and
   returns TRACE_TYPE_HANDLED value
 - LOST EVENT trace do not handle trace_seq overflow

These reasons force the while loop in tracing_read_pipe
function never to break.

The attached patch fixies handling of lost event trace, and
changes trace_nop_print to print minimal info, which is needed
for the correct tracing_read_pipe processing.

v2 changes:
 - omit the cond_resched changes by trace_nop_print changes
 - WARN changed to WARN_ONCE and added info to be able
   to find out the culprit

v3 changes:
 - make more accurate patch comment

Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
LKML-Reference: &lt;20110325110518.GC1922@jolsa.brq.redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>urn:sha1:25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
</entry>
<entry>
<title>tracing: Fix irqoff selftest expanding max buffer</title>
<updated>2011-03-10T15:34:58Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-03-10T01:09:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4a0b1665db09cf2da9ad7d0f12da386373c10bfa'/>
<id>urn:sha1:4a0b1665db09cf2da9ad7d0f12da386373c10bfa</id>
<content type='text'>
If the kernel command line declares a tracer "ftrace=sometracer" and
that tracer is either not defined or is enabled after irqsoff,
then the irqs off selftest will fail with the following error:

Testing tracer irqsoff:
------------[ cut here ]------------
WARNING: at /home/rostedt/work/autotest/nobackup/linux-test.git/kernel/trace/tra
ce.c:713 update_max_tr_single+0xfa/0x11b()
Hardware name:
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.38-rc8-test #1
Call Trace:
 [&lt;c0441d9d&gt;] ? warn_slowpath_common+0x65/0x7a
 [&lt;c049adb2&gt;] ? update_max_tr_single+0xfa/0x11b
 [&lt;c0441dc1&gt;] ? warn_slowpath_null+0xf/0x13
 [&lt;c049adb2&gt;] ? update_max_tr_single+0xfa/0x11b
 [&lt;c049e454&gt;] ? stop_critical_timing+0x154/0x204
 [&lt;c049b54b&gt;] ? trace_selftest_startup_irqsoff+0x5b/0xc1
 [&lt;c049b54b&gt;] ? trace_selftest_startup_irqsoff+0x5b/0xc1
 [&lt;c049b54b&gt;] ? trace_selftest_startup_irqsoff+0x5b/0xc1
 [&lt;c049e529&gt;] ? time_hardirqs_on+0x25/0x28
 [&lt;c0468bca&gt;] ? trace_hardirqs_on_caller+0x18/0x12f
 [&lt;c0468cec&gt;] ? trace_hardirqs_on+0xb/0xd
 [&lt;c049b54b&gt;] ? trace_selftest_startup_irqsoff+0x5b/0xc1
 [&lt;c049b6b8&gt;] ? register_tracer+0xf8/0x1a3
 [&lt;c14e93fe&gt;] ? init_irqsoff_tracer+0xd/0x11
 [&lt;c040115e&gt;] ? do_one_initcall+0x71/0x121
 [&lt;c14e93f1&gt;] ? init_irqsoff_tracer+0x0/0x11
 [&lt;c14ce3a9&gt;] ? kernel_init+0x13a/0x1b6
 [&lt;c14ce26f&gt;] ? kernel_init+0x0/0x1b6
 [&lt;c0403842&gt;] ? kernel_thread_helper+0x6/0x10
---[ end trace e93713a9d40cd06c ]---
.. no entries found ..FAILED!

What happens is the "ftrace=..." will expand the ring buffer to its
default size (from its minimum size) but it will not expand the
max ring buffer (the ring buffer to store maximum latencies).
When the irqsoff test runs, it will call the ring buffer swap routine
that checks if the max ring buffer is the same size as the normal
ring buffer, and will fail if it is not. This causes the test to fail.

The solution is to expand the max ring buffer before running the self
test if the max ring buffer is used by that tracer and the normal ring
buffer is expanded. The max ring buffer should be shrunk again after
the test is done to save space.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Remove lock_depth from event entry</title>
<updated>2011-03-10T15:31:48Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-03-09T15:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e6e1e2593592a8f6f6380496655d8c6f67431266'/>
<id>urn:sha1:e6e1e2593592a8f6f6380496655d8c6f67431266</id>
<content type='text'>
The lock_depth field in the event headers was added as a temporary
data point for help in removing the BKL. Now that the BKL is pretty
much been removed, we can remove this field.

This in turn changes the header from 12 bytes to 8 bytes,
removing the 4 byte buffer that gcc would insert if the first field
in the data load was 8 bytes in size.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Add an 'overwrite' trace_option.</title>
<updated>2011-03-09T18:52:27Z</updated>
<author>
<name>David Sharp</name>
<email>dhsharp@google.com</email>
</author>
<published>2010-12-08T21:46:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=750912fa366312e9c5bc83eab352898a26750401'/>
<id>urn:sha1:750912fa366312e9c5bc83eab352898a26750401</id>
<content type='text'>
Add an "overwrite" trace_option for ftrace to control whether the buffer should
be overwritten on overflow or not. The default remains to overwrite old events
when the buffer is full. This patch adds the option to instead discard newest
events when the buffer is full. This is useful to get a snapshot of traces just
after enabling traces. Dropping the current event is also a simpler code path.

Signed-off-by: David Sharp &lt;dhsharp@google.com&gt;
LKML-Reference: &lt;1291844807-15481-1-git-send-email-dhsharp@google.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
