Hi Ravindra,

I have only had a look at the documentation and not worked with CTF at all so 
far, so take my words with a grain of salt.
I don’t really get why you define 32 different streams in your metadata which 
means you have to copy the event definition as well 32 times.
This amount of duplication seems inflexible and with a lot of overhead, so I 
would assume there is a more elegant way.

If I understand the documentation correctly, then you can have multiple files 
containing data of a single stream (type). You just need the proper headers at 
the beginning of each file.
If you have one trace file per CPU, which all generate the same types of events 
and only differ regarding the respective cpu id, isn’t something like in the 
examples of the CTF documentation possible 
(https://diamon.org/ctf/#ex-packet-context) ?
Then, each file would contain one “ctf packet” where the packet header defines 
the cpu id and then a consecutive list of the events of this cpu.

Also, in your previous metadata description it looks like you already encode 
the cpu id as part of the event header, so why then the duplication? And why 
was the cpu id in the event header, shouldn’t it be in the event context?

Sebastian mentioned a more complex format necessary for the TraceCompass 
application. I have not checked this.

Best regards,

   Jan



Von: devel [mailto:devel-boun...@rtems.org] Im Auftrag von Ravindra Kumar Meena
Gesendet: Mittwoch, 10. Juli 2019 09:53
An: Sebastian Huber
Cc: rtems-de...@rtems.org
Betreff: Re: GSoC Project | Basic support for Trace Compass

Hi,

Yesterday, I modified the metadata so that babeltrace can read the multiple 
stream files.

For this, I added the stream_id at the beginning of every stream file. e.g 
0,1,.....31.

https://github.com/rmeena840/rtems-tools/commit/7c6b27192e1dbdc405db7280b3f2f672ac32488b

I modified the metadata by keeping in the following format in mind:
<strean_id> <ns> <event> <data> <ns> <event> <data>.....

https://github.com/rmeena840/rtems-tools/commit/5acaea6b5983c903ce904f17220655664b57513b

The babeltrace was able to read the values from each stream files.

Now, I came across trace compass examples which use one stream in metadata to 
read the multiple stream files.

I tried this approach but the babeltrace gives me following error:

[error] Stream 17 is not declared in metadata.
[error] Stream index creation error.
[error] Open file stream error.
[warning] [Context] Cannot open_trace of format ctf at path ctf.
[warning] [Context] cannot open trace "ctf" from ctf for reading.
[error] Cannot open any trace for reading.

[error] opening trace "ctf" for reading.

[error] none of the specified trace paths could be opened.

I even added packet.context in the stream but still, it reports me the same 
error.

struct packet_context {
uint64_clock_monotonic_t timestamp_begin;
uint64_clock_monotonic_t timestamp_end;
uint64_t content_size;
uint64_t packet_size;
uint64_t packet_seq_num;
uint32_t events_discarded;
uint32_t cpu_id;
};



--
Ravindra Kumar Meena,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of 
Mines)<https://www.iitism.ac.in/>, Dhanbad
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to