<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/kernel/trace/trace_functions_graph.c, branch v2.6.30.4</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v2.6.30.4</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v2.6.30.4'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2009-03-24T13:31:34+00:00</updated>
<entry>
<title>function-graph: moved the timestamp from arch to generic code</title>
<updated>2009-03-24T13:31:34+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-24T03:38:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5d1a03dc541dc6672e60e57249ed22f40654ca47'/>
<id>urn:sha1:5d1a03dc541dc6672e60e57249ed22f40654ca47</id>
<content type='text'>
This patch move the timestamp from happening in the arch specific
code into the general code. This allows for better control by the tracer
to time manipulation.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>function-graph: show binary events as comments</title>
<updated>2009-03-19T19:58:56+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-19T19:14:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5087f8d2a2f2daff5a913d72d8ea3ad601948e10'/>
<id>urn:sha1:5087f8d2a2f2daff5a913d72d8ea3ad601948e10</id>
<content type='text'>
With the added TRACE_EVENT macro, the events no longer appear in
the function graph tracer. This was because the function graph
did not know how to display the entries. The graph tracer was
only aware of its own entries and the printk entries.

By using the event call back feature, the graph tracer can now display
the events.

 # echo irq &gt; /debug/tracing/set_event

Which can show:

 0)               |          handle_IRQ_event() {
 0)               |            /* irq_handler_entry: irq=48 handler=eth0 */
 0)               |            e1000_intr() {
 0)   0.926 us    |              __napi_schedule();
 0)   3.888 us    |            }
 0)               |            /* irq_handler_exit: irq=48 return=handled */
 0)   0.655 us    |            runqueue_is_locked();
 0)               |            __wake_up() {
 0)   0.831 us    |              _spin_lock_irqsave();

The irq entry and exit events show up as comments.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>function-graph: calculate function depth within function graph tracer</title>
<updated>2009-03-19T19:58:38+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-19T17:24:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2fbcdb35aca614f9529a0e7d340146cf0b71684f'/>
<id>urn:sha1:2fbcdb35aca614f9529a0e7d340146cf0b71684f</id>
<content type='text'>
Currently, the function graph tracer depends on the trace_printk
to record the depth. All the information is already there in the trace
to calculate function depth, with the exception of having the printk
be the first item. But as soon as a entry or exit is reached, then
we know the depth.

This patch changes the iter-&gt;private data from recording a per cpu
last_pid, to a structure that holds both the last_pid and the current
depth. This data is used to determine the function depth for the
printks.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>function-graph: consolidate prologues for output</title>
<updated>2009-03-19T15:29:23+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-19T15:29:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ac5f6c96859e9a664ac05b04bc96ed1caad5fe29'/>
<id>urn:sha1:ac5f6c96859e9a664ac05b04bc96ed1caad5fe29</id>
<content type='text'>
Impact: clean up

The prologue of the function graph entry, return and comments all
start out pretty much the same. Each of these duplicate code and
do so slightly differently.

This patch consolidates the printing of the pid, absolute time,
cpu and proc (and for entry, the interrupt).

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracing: protect reader of cmdline output</title>
<updated>2009-03-17T03:27:06+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-16T23:20:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4ca530852346be239b7c19e7bec5d2b78855bebe'/>
<id>urn:sha1:4ca530852346be239b7c19e7bec5d2b78855bebe</id>
<content type='text'>
Impact: fix to one cause of incorrect comm outputs in trace

The spinlock only protected the creation of a comm &lt;=&gt; pid pair.
But it was possible that a reader could look up a pid, and get the
wrong comm because it had no locking.

This also required changing trace_find_cmdline to copy the comm cache
and not just send back a pointer to it.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracing/core: bring back raw trace_printk for dynamic formats strings</title>
<updated>2009-03-13T01:15:00+00:00</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-12T17:24:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=48ead02030f849d011259244bb4ea9b985479006'/>
<id>urn:sha1:48ead02030f849d011259244bb4ea9b985479006</id>
<content type='text'>
Impact: fix callsites with dynamic format strings

Since its new binary implementation, trace_printk() internally uses static
containers for the format strings on each callsites. But the value is
assigned once at build time, which means that it can't take dynamic
formats.

So this patch unearthes the raw trace_printk implementation for the callers
that will need trace_printk to be able to carry these dynamic format
strings. The trace_printk() macro will use the appropriate implementation
for each callsite. Most of the time however, the binary implementation will
still be used.

The other impact of this patch is that mmiotrace_printk() will use the old
implementation because it calls the low level trace_vprintk and we can't
guess here whether the format passed in it is dynamic or not.

Some parts of this patch have been written by Steven Rostedt (most notably
the part that chooses the appropriate implementation for each callsites).

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tip/tracing/ftrace' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/ftrace</title>
<updated>2009-03-10T21:55:31+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-10T21:55:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e2b8b2808538a91444e78c7db5a30519cadd09b2'/>
<id>urn:sha1:e2b8b2808538a91444e78c7db5a30519cadd09b2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tracing: remove funky whitespace in the trace code</title>
<updated>2009-03-10T18:13:14+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-10T18:10:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ef18012b248b47ec9a12c3a83ca5e99782d39c5d'/>
<id>urn:sha1:ef18012b248b47ec9a12c3a83ca5e99782d39c5d</id>
<content type='text'>
Impact: clean up

There existed a lot of &lt;space&gt;&lt;tab&gt;'s in the tracing code. This
patch removes them.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86/core' into tracing/ftrace</title>
<updated>2009-03-10T09:17:48+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-10T09:16:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8293dd6f86e759068ce918aa10ca9c5d6d711cd0'/>
<id>urn:sha1:8293dd6f86e759068ce918aa10ca9c5d6d711cd0</id>
<content type='text'>
Semantic merge:

  kernel/trace/trace_functions_graph.c

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing/core: drop the old trace_printk() implementation in favour of trace_bprintk()</title>
<updated>2009-03-06T16:59:12+00:00</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-06T16:21:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=769b0441f438c4bb4872cb8560eb6fe51bcc09ee'/>
<id>urn:sha1:769b0441f438c4bb4872cb8560eb6fe51bcc09ee</id>
<content type='text'>
Impact: faster and lighter tracing

Now that we have trace_bprintk() which is faster and consume lesser
memory than trace_printk() and has the same purpose, we can now drop
the old implementation in favour of the binary one from trace_bprintk(),
which means we move all the implementation of trace_bprintk() to
trace_printk(), so the Api doesn't change except that we must now use
trace_seq_bprintk() to print the TRACE_PRINT entries.

Some changes result of this:

- Previously, trace_bprintk depended of a single tracer and couldn't
  work without. This tracer has been dropped and the whole implementation
  of trace_printk() (like the module formats management) is now integrated
  in the tracing core (comes with CONFIG_TRACING), though we keep the file
  trace_printk (previously trace_bprintk.c) where we can find the module
  management. Thus we don't overflow trace.c

- changes some parts to use trace_seq_bprintk() to print TRACE_PRINT entries.

- change a bit trace_printk/trace_vprintk macros to support non-builtin formats
  constants, and fix 'const' qualifiers warnings. But this is all transparent for
  developers.

- etc...

V2:

- Rebase against last changes
- Fix mispell on the changelog

V3:

- Rebase against last changes (moving trace_printk() to kernel.h)

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1236356510-8381-5-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
