Skip to main content

[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

Hi Matthew,

I was thinking a long the lines of having overridable protected getTimestampComparator() and returns default StreamInputReaderTimestampComparator() in CTFTraceReader. I assume any extended reader can be paired to support custom trace.


On Mon, 22 Jul 2019 at 14:14, Matthew Khouzam <matthew.khouzam@xxxxxxxxxxxx> wrote:

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.



From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Phyo Kyaw <>
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.

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.

tracecompass-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top