[lttng-dev] Question about Transformation to CTF file
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Thu Aug 9 09:13:14 EDT 2012
CCing lttng-dev and eclipse lttng plugin developers,
* Runhua Xu (xurunhua23 at hotmail.com) wrote:
>
> Hi Mathieu,
> I am a student and I am now writing my graduation thesis. The purpose
> of my thesis is to develop a kernel module and trace some syscalls
> generated by playing games on Android, and analyze the results.
> Currently, my tracer module works fine and I can save a txt file with
> the information I need, like PID, time, scheduler information, syscall
> numbers and so on, in the sdcard. Now I am working on the final phase,
> which is to show the logs vividly. I found that Eclipse Linux Tools
> are really helpful, therefore, I want to transfer my .txt trace file
> into the Common Trace Format, and use the Eclipse Linux Tools to show
> the statistics and graphics.
> I installed babeltrace, and use babeltrace-log to transfer my file
> into the corresponding CTF file, by using "cat myfile.txt |
> babeltrace-log -t CTF_File" (I am not sure whether it is the correct
babeltrace-log expects a dmesg linux kernel output, so I'm not sure this
is what you provide as input. Especially the "-t" option expects the
dmesg formatting that starts with the timestamp between brackets at the
beginning of each line. You might want to drop the -t ?
> way, but I couldn't find more information about that). However, when I
> use the Eclipse Linux Tools to open the CTF file, it reports error
> "Problems occurred when invoking code from plug-in:
> "org.eclipse.jface". I tried the tools with the sample CTF file, which
> is provided by LTTng, it succeeded. Then I looked into the metadata of
> the transferred CTF file (see below codes in blue), it seems that it
> remains the original format, doesn't change based on my input file.
This looks like a bug in the eclipse tool. I'll let Alexandre handle
this part. Please test with "babeltrace" too to see if it is parsed
correctly by the C parser.
> Which then results into the error message in eclipse.
> I got stuck here for several days. I read the documents regarding
> tracebabel and CTF on efficios, but didn't get too much insight how
> should I generate my own CTF file for the current .txt log. And there
> are not too much information online. Would you please kindly give me
> some tips, how should I continue? Did I use the correct way for
> babeltrace-log? Or, I should write my own metadata and write some C
> codes to generate the corresponding datastream? I am a newbee and
> don't know too much about what to do with CTF. Please help me.
> Thanks a lot in advance.
> Regards,Ryan
The output has been wrapped by your mail client into a single line
please allow me to reformat it:
> /* CTF 1.8 */
> typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
> typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
> trace {
> major = 1;
> minor = 0;
> uuid = "c1aa954c-7771-464e-9045-d67343a31c1d";
> byte_order = le;
> packet.header := struct {
> uint32_t magic;
> uint8_t uuid[16];
> };
> };
> stream {
> packet.context := struct {
> uint32_t content_size;
> uint32_t packet_size;
> };
> typealias integer { size = 64; align = 64; signed = false; } := uint64_t;
> event.header := struct {
> uint64_t timestamp;
> };
> };
What I see here is that I think the eclipse CTF parser might have issues
with the typealias declaration nested within the stream declaration.
Thanks,
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list