[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] CTF trace reader: ordering events in multiple streams with same timestamp

Hey Phyo,


I hit the same problem a couple of weeks ago, try pulling the latest trace compass. It could help. For extending StreamInputReaderTimestampComparator.... that name leaves room for improvement. would a constructor with a new comparator work for you?


Something like CTFTrace(Dir, Comparator). I am hesitant to make one as it would be possible to make a broken reader that loses events/throws exceptions.


Thoughts?


Matthew.


From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Phyo Kyaw <phyokyaw.uk@xxxxxxxxx>
Sent: Tuesday, July 9, 2019 9:19:02 AM
To: tracecompass-dev@xxxxxxxxxxx <tracecompass-dev@xxxxxxxxxxx>
Subject: [tracecompass-dev] CTF trace reader: ordering events in multiple streams with same timestamp
 
Dear all,

We have generated CTF trace file with multiple streams for each core and in some cases CTF events can have same timestamp during to sampling rate faster than clock speed. In this case the order seems to be what ever created first and assigned reader.

Generated
Event in stream file 1:    001 Core 0 Started work
Event in stream file 2:    001 Core 1 Completed work

Read back
001 Core 1 Completed work
001 Core 0 Started work


Looks like CTFTraceReader() has StreamInputReaderTimestampComparator() which is a bit inflexible to extend or modify.

Any suggestions to make it shown as written. I understand no other information to order them but we can add extra attribute during creation to set the order.

Thanks
Phyo