babeltrace converting text <=> ctf
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines · * Sebastian Andrzej Siewior ([email protected]) wrote:
I started lltng to dump a few kernel events, nothing special. Once I had the binary CTF I converted it to text output via
|babeltrace -w trace.txt
kernel/| [10:40:10.357768920] (+?.?????????) squsb kmalloc: { cpu_id = 3 }, { call_site = … | [10:40:10.357785010] (+0.000016090) squsb kfree: { cpu_id = 3 }, { call_site = … | [10:40:10.357800700] (+0.000015690) squsb kmalloc: { cpu_id = 3 }, { call_site = …and now back to CTF. Since babeltrace does not support text as input or CTF as output (and the error message was not giving a hint) I tried it with babeltrace-log:
|babeltrace-log < trace.txt
ctf_v1and now back to text:
|babeltrace -w ctv_v1.txt
ctf_v1
Quoted 8 lines
and I got:
| 0 string: { }, { str = "[10:40:10.357768920] (+?.?????????) squsb kmalloc: { cpu_id = 3 }, { call_site = … | 0 string: { }, { str = "[10:40:10.357785010] (+0.000016090) squsb kfree: { cpu_id = 3 }, { call_site = … | 0 string: { }, { str = "[10:40:10.357800700] (+0.000015690) squsb kmalloc: { cpu_id = 3 }, { call_site = …What I don't like here, is that the timestamp information is lost. Looking at babeltrace-log I noticed a timestamp option. So I tried this:
babeltrace-log is made to go from a dmesg output to CTF.
Quoted 10 lines
|babeltrace-log -t < trace.txt ctf_v2 |babeltrace -w ctv_v2.txt ctf_v2 |[error] Invalid magic number 0x0 at packet 26 (file offset 851968). |[error] Open file stream error.buh. After looking at babeltrace-log I noticed that the
sscanf()does not match anything because the timestamp value is different. So I tried to change the input so thesscanf()will match:
Quoted 8 lines
|babeltrace -w trace_seconds.txt --clock-seconds kernel/ |babeltrace-log -t < trace_seconds.txt ctf_v3 |babeltrace -w ctf_v3.txt ctf_v3/ |[error] Invalid magic number 0x1F72CF7C at packet 81 (file offset 2654208). |[error] Open file stream error.Little different but still doesn't work.
Could this be an user error or an easy to spot CTF libary bug?
babeltrace-log is not meant to convert from CTF pretty-printing output, but rather from dmesg logs.
What you seem to be looking for is a CTF pretty-printed log format to CTF converter, which does not exist today.
Sorry for the late reply,
Thanks,
Mathieu
Quoted 7 lines
Sebastian
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 8 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev