tmp_suning_uos_patched/include
Steven Rostedt dd0e545f06 ftrace: printk formatting infrastructure
This patch adds a feature that can help kernel developers debug their
code using ftrace.

  int ftrace_printk(const char *fmt, ...);

This records into the ftrace buffer using printf formatting. The entry
size in the buffers are still a fixed length. A new type has been added
that allows for more entries to be used for a single recording.

The start of the print is still the same as the other entries.

It returns the number of characters written to the ftrace buffer.

For example:

Having a module with the following code:

static int __init ftrace_print_test(void)
{
        ftrace_printk("jiffies are %ld\n", jiffies);
        return 0;
}

Gives me:

  insmod-5441  3...1 7569us : ftrace_print_test: jiffies are 4296626666

for the latency_trace file and:

          insmod-5441  [03]  1959.370498: ftrace_print_test jiffies are 4296626666

for the trace file.

Note: Only the infrastructure should go into the kernel. It is to help
facilitate debugging for other kernel developers. Calls to ftrace_printk
is not intended to be left in the kernel, and should be frowned upon just
like scattering printks around in the code.

But having this easily at your fingertips helps the debugging go faster
and bugs be solved quicker.

Maybe later on, we can hook this with markers and have their printf format
be sucked into ftrace output.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-14 10:35:19 +02:00
..
acpi
asm-arm
asm-cris
asm-frv
asm-generic ftrace: create __mcount_loc section 2008-10-14 10:34:40 +02:00
asm-m32r
asm-m68k
asm-mips
asm-mn10300
asm-parisc
asm-um
asm-x86 ftrace: mcount call site on boot nops core 2008-10-14 10:34:44 +02:00
asm-xtensa
crypto
drm
keys
linux ftrace: printk formatting infrastructure 2008-10-14 10:35:19 +02:00
math-emu
media
mtd
net
pcmcia
rdma
rxrpc
scsi
sound
trace sched: clean up tracepoints 2008-10-14 10:33:14 +02:00
video
xen
Kbuild