<div dir="ltr">Thanks a lot Jérémie :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-13 14:48 GMT-04:00 Jérémie Galarneau <span dir="ltr"><<a href="mailto:jeremie.galarneau@efficios.com" target="_blank">jeremie.galarneau@efficios.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jessica,<br>
<br>
I suggest you start by looking at this example in Babeltrace's<br>
tree[1]. These will show you how to read a CTF trace's events from a<br>
Python script.<br>
<br>
As for formatting the events as CSV, there is a section dedicated to<br>
this topic in Python's documentation [2].<br>
<br>
Regards,<br>
Jérémie<br>
<br>
[1] <a href="https://bugs.lttng.org/projects/babeltrace/repository/revisions/master/entry/bindings/python/examples/example-api-test.py" target="_blank">https://bugs.lttng.org/projects/babeltrace/repository/revisions/master/entry/bindings/python/examples/example-api-test.py</a><br>
[2] <a href="https://docs.python.org/3.4/library/csv.html" target="_blank">https://docs.python.org/3.4/library/csv.html</a><br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, May 12, 2014 at 7:24 PM, Jessica Foest <<a href="mailto:jessica.foest@gmail.com">jessica.foest@gmail.com</a>> wrote:<br>
> Thanks for your detailed responses :)<br>
> Actually i will begin by taking my own trace that i will configure it in<br>
> advance ( same event type , and i will add the different event context that<br>
> i need ) .<br>
> It's my first time to develop with python and i don't really know the<br>
> architecture of babeltrace , So can you help me and tell me how to proceed<br>
> to filter my data from CTF to the output Format that i will choose ?<br>
> I'm only interested on kernel space tracing .<br>
><br>
><br>
> 2014-05-08 17:29 GMT-04:00 Jessica Foest <<a href="mailto:jessica.foest@gmail.com">jessica.foest@gmail.com</a>>:<br>
><br>
>> i work only on kernel space event .<br>
>><br>
>><br>
>> 2014-05-08 17:10 GMT-04:00 Jessica Foest <<a href="mailto:jessica.foest@gmail.com">jessica.foest@gmail.com</a>>:<br>
>><br>
>>> Thanks for your detailed responses :)<br>
>>> Actually i will begin by taking my own trace that i will configure it in<br>
>>> advance ( same event type , and i will add the different event context that<br>
>>> i need ) .<br>
>>> It's my first time to develop with python and i don't really know the<br>
>>> architecture of babeltrace , So can you help me and tell me how to proceed<br>
>>> to filter my data from CTF to the output Format that i will choose ?<br>
>>><br>
>>><br>
>>> 2014-05-08 11:53 GMT-04:00 Alexandre Montplaisir<br>
>>> <<a href="mailto:alexmonthy@voxpopuli.im">alexmonthy@voxpopuli.im</a>>:<br>
>>><br>
>>>><br>
>>>>> To avoid doing a complete first pass of the trace, you can just<br>
>>>>> iterate on the event types as described in the metadata, and take note<br>
>>>>> of all the possible field you can find in the trace. Then, during your<br>
>>>>> only pass, you already know all your "columns".<br>
>>>><br>
>>>><br>
>>>> That's true. Although right now TMF doesn't have an API to ask a trace<br>
>>>> "give me all the event types you have", other than just reading the trace ;)<br>
>>>><br>
>>>> wrt CTF, it's possible to have events in the metadata that don't<br>
>>>> actually show up in the trace. But that's not really a problem, at worst<br>
>>>> you'd end up with empty columns.<br>
>>><br>
>>><br>
>><br>
><br>
<br>
<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">--<br>
Jérémie Galarneau<br>
EfficiOS Inc.<br>
<a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a><br>
</div></div></blockquote></div><br></div>