GSoC Project | Basic Support for Trace Compass

Gedare Bloom gedare at rtems.org
Mon Jun 24 16:22:29 UTC 2019


On Mon, Jun 24, 2019 at 10:00 AM Ravindra Kumar Meena
<rmeena840 at gmail.com> wrote:
>>
>>
>> https://diamon.org/ctf/#spec7 - "Magic number (CTF magic number:
>> 0xC1FC1FC1) specifies that this is a CTF packet. This magic number is
>> optional ... Stream ID, used as reference to stream description in
>> metadata. This field is optional if there is only one stream
>> description"
>>
>> These errors are caused by the metadata mismatch from the stream file,
>> not by babeltrace.  You need to write the metadata to match the trace
>> data / stream.
>
>
> The native trace stream in HEX currently looks like this
>
> 0400 0000 ed65 7e3d 0d00 010a 6231 5443
> 5e00 0000 5e00 0000 5e00 0000 0010 0000
> 0000 0000 0100 0000 0000 0000 0400 0000
> 61a3 813d 0000 0000 0d00 010a 5e00 0000
> 5e00 0000 1100 0000 0100 0000 0000 0000
> 0400 0000 3bb2 843d da0e 0300 0d00 010a
>
> Above one is not CTF stream because it does not have CTF magic number
>
> So it should look like this in HEX
>
> c11f fcc1 0000 0000 0000 0000 0000 0000
> 0400 0000 ed65 7e3d 0d00 010a 6231 5443
> 5e00 0000 5e00 0000 5e00 0000 0010 0000
> 0000 0000 0100 0000 0000 0000 0400 0000
> 61a3 813d 0000 0000 0d00 010a 5e00 0000
> 5e00 0000 1100 0000 0100 0000 0000 0000
> 0400 0000 3bb2 843d da0e 0300 0d00 010a
>
> All the example on [1] have this thing in common. I modified the stream file and added magic number(0xc11fcc1) in it. Then, I parsed both stream file and metadata. Babeltrace was able to read the stream file.
>

Since the magic number is optional, you should see if you can
construct a simple example metadata and stream file that does not use
the magic number and whether it works with babeltrace or not.

> [1] https://diamon.org/ctf/
> --
> Ravindra Kumar Meena,
> B. Tech. Computer Science and Engineering,
> Indian Institute of Technology (Indian School of Mines), Dhanbad


More information about the devel mailing list