All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Question about Transformation to CTF file
       [not found] ` <BLU157-W15D8B7E7F51D2008B7A46CD6CC0@phx.gbl>
@ 2012-08-09 13:13   ` Mathieu Desnoyers
       [not found]   ` <20120809131314.GA8081@Krystal>
  1 sibling, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2012-08-09 13:13 UTC (permalink / raw)
  To: Runhua Xu; +Cc: lttng-dev, Matthew Khouzam, alexandre.montplaisir

CCing lttng-dev and eclipse lttng plugin developers,

* Runhua Xu (xurunhua23@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about Transformation to CTF file
       [not found]   ` <20120809131314.GA8081@Krystal>
@ 2012-08-09 14:43     ` Alexandre Montplaisir
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Montplaisir @ 2012-08-09 14:43 UTC (permalink / raw)
  To: Runhua Xu; +Cc: lttng-dev, Mathieu Desnoyers, Matthew Khouzam

Hi,

On 12-08-09 09:13 AM, Mathieu Desnoyers wrote:
> CCing lttng-dev and eclipse lttng plugin developers,
>
> * Runhua Xu (xurunhua23@hotmail.com) wrote:
> [...]
>> 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.

Could we get a copy of that trace please? If the CTF is invalid, then of
course it might have problems parsing, but it could be interesting to
see if the error handling is done correctly.


To convert traces to and from CTF format, you might want to check out
the not-yet-officially-released Javeltrace tool:
http://www.dorsal.polymtl.ca/~pproulx/javeltrace/

It won't do what you want to do out of the box, but it really helps
understanding the CTF format.

Cheers,

-- 
Alexandre Montplaisir
DORSAL lab,
École Polytechnique de Montréal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-09 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <BLU157-W4856E0646C86D62AD6C1D1D6CE0@phx.gbl>
     [not found] ` <BLU157-W15D8B7E7F51D2008B7A46CD6CC0@phx.gbl>
2012-08-09 13:13   ` Question about Transformation to CTF file Mathieu Desnoyers
     [not found]   ` <20120809131314.GA8081@Krystal>
2012-08-09 14:43     ` Alexandre Montplaisir

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.