Re: [PATCH] tracing: fix trace_print_seq()

From: Li Zefan
Date: Thu Jul 02 2009 - 01:56:28 EST


>> There have a example:
>> after reboot:
>> # echo kmemtrace > current_tracer
>> # echo 0 > options/kmem_minimalistic
>> # cat trace
>> # tracer: kmemtrace
>> #
>> #
>> Nothing is exported, because the first byte of trace_seq->buffer[ ]
>> is KMEMTRACE_USER_ALLOC.
>> ( the value of KMEMTRACE_USER_ALLOC is zero, seeing
>> kmemtrace_print_alloc_user() in kernel/trace/kmemtrace.c)
>>
...
> Looks good, thanks.
>
> Acked-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
>
> But having a '\0' in a non binary trace looks weird. Why do
> we have such plain KMEMTRACE_USER_ALLOC whereas binary tracing
> is not set, as your example shows it?
>

Because of this commit:

| commit 42af9054c0eeed09ec58d13ec8bf52d225ebcfcc
| Author: Eduard - Gabriel Munteanu <eduard.munteanu@xxxxxxxxxxx>
| Date: Mon Mar 23 15:12:26 2009 +0200
|
| kmemtrace: restore original tracing data binary format, improve ABI

I think we should change it to use trace_event->binary() interface for
binary trace.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/