<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_output.c, branch v2.6.30</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=v2.6.30</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.30'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-04-07T11:59:23Z</updated>
<entry>
<title>tracing: fix incorrect return type of ns2usecs()</title>
<updated>2009-04-07T11:59:23Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2009-03-30T05:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf8e3474654f20433aab9aa35826d43b5f245008'/>
<id>urn:sha1:cf8e3474654f20433aab9aa35826d43b5f245008</id>
<content type='text'>
Impact: fix time output bug in 32bits system

ns2usecs() returns 'long', it's incorrect.

(In i386)
...
          &lt;idle&gt;-0     [000]   521.442100: _spin_lock &lt;-tick_do_update_jiffies64
          &lt;idle&gt;-0     [000]   521.442101: do_timer &lt;-tick_do_update_jiffies64
          &lt;idle&gt;-0     [000]   521.442102: update_wall_time &lt;-do_timer
          &lt;idle&gt;-0     [000]   521.442102: update_xtime_cache &lt;-update_wall_time
....
(It always print the time less than 2200 seconds besides ...)
Because 'long' is 32bits in i386. ( (1&lt;&lt;31) useconds is about 2200 seconds)

...
          &lt;idle&gt;-0     [001] 4154502640.134759: rcu_bh_qsctr_inc &lt;-__do_softirq
          &lt;idle&gt;-0     [001] 4154502640.134760: _local_bh_enable &lt;-__do_softirq
          &lt;idle&gt;-0     [001] 4154502640.134761: idle_cpu &lt;-irq_exit
...
(very large value)
Because 'long' is a signed type and it is 32bits in i386.

Changes in v2:
return 'unsigned long long' instead of 'cycle_t'

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
LKML-Reference: &lt;49D05D10.4030009@cn.fujitsu.com&gt;
Reported-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>trace: make argument 'mem' of trace_seq_putmem() const</title>
<updated>2009-03-31T15:45:13Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-03-27T02:21:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b14b70a6a4e394c9630bcde17e07d3bcdcbca27e'/>
<id>urn:sha1:b14b70a6a4e394c9630bcde17e07d3bcdcbca27e</id>
<content type='text'>
Impact: fix build warning

I passed a const value to trace_seq_putmem(), and I got compile warning.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: provide trace_seq_reserve()</title>
<updated>2009-03-31T15:45:02Z</updated>
<author>
<name>Eduard - Gabriel Munteanu</name>
<email>eduard.munteanu@linux360.ro</email>
</author>
<published>2009-03-23T13:12:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bdd6df6af98ce7e70702edfb5fd5dbbd8d1b0453'/>
<id>urn:sha1:bdd6df6af98ce7e70702edfb5fd5dbbd8d1b0453</id>
<content type='text'>
trace_seq_reserve() allows a caller to reserve space in a trace_seq and
write directly into it. This makes it easier to export binary data to
userspace via the tracing interface, by simply filling in a struct.

Signed-off-by: Eduard - Gabriel Munteanu &lt;eduard.munteanu@linux360.ro&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>ftrace: ensure every event gets an id</title>
<updated>2009-03-20T09:17:06Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2009-03-19T19:26:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28bea271e58e429eccfad3d7ee2ad12d6ee015bf'/>
<id>urn:sha1:28bea271e58e429eccfad3d7ee2ad12d6ee015bf</id>
<content type='text'>
Impact: widen user-space visibe event IDs to all events

Previously only TRACE_EVENT events got ids, because only they
generated raw output which needs to be demuxed from the trace.

In order to provide a unique ID for each event, register everybody,
regardless.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;20090319194233.464914218@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: make print_(b)printk_msg_only global</title>
<updated>2009-03-19T19:57:55Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-19T16:20:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ef841f6f32dce0b752a4fa0622781ee67a0e874'/>
<id>urn:sha1:5ef841f6f32dce0b752a4fa0622781ee67a0e874</id>
<content type='text'>
This patch makes print_printk_msg_only and print_bprintk_msg_only
global for other functions to use. It also renames them by adding
a "trace_" to the beginning to avoid namespace collisions.

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:06Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-16T23:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:00Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-12T17:24:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>tracing: remove funky whitespace in the trace code</title>
<updated>2009-03-10T18:13:14Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-10T18:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>tracing/core: drop the old trace_printk() implementation in favour of trace_bprintk()</title>
<updated>2009-03-06T16:59:12Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-06T16:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>
<entry>
<title>tracing: infrastructure for supporting binary record</title>
<updated>2009-03-06T16:59:11Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2009-03-06T16:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1427cdf0592368bdec57276edaf714040ee8744f'/>
<id>urn:sha1:1427cdf0592368bdec57276edaf714040ee8744f</id>
<content type='text'>
Impact: save on memory for tracing

Current tracers are typically using a struct(like struct ftrace_entry,
struct ctx_switch_entry, struct special_entr etc...)to record a binary
event. These structs can only record a their own kind of events.
A new kind of tracer need a new struct and a lot of code too handle it.

So we need a generic binary record for events. This infrastructure
is for this purpose.

[fweisbec@gmail.com: rebase against latest -tip, make it safe while sched
tracing as reported by Steven Rostedt]

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