Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331379

Summary: [LTTng] Seek by time may not give the correct position
Product: z_Archived Reporter: Matthew Khouzam <matthew.khouzam>
Component: LinuxToolsAssignee: Francois Chouinard <fchouinard>
Status: CLOSED WONTFIX QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3 CC: patrick.tasse
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 321366    
Attachments:
Description Flags
Patch to overload the compareto event and make the sort more stable. none

Description Matthew Khouzam CLA 2010-11-29 15:48:51 EST
Build Identifier: 

The current way of seeking will return the first event of a given timestamp. Timestamps are not necessarily always unique. This means that if you seek the second of 2 events with the same timestamp the first one will be returned. This can add extra events and skew the statistics and the state machine. 

Reproducible: Didn't try

Steps to Reproduce:
1.Have a trace with several events with the same timestamp. (hard to make) 
2.Seek in the foreground when the background request is reading between two events having the same tiemstamp.
Comment 1 Matthew Khouzam CLA 2010-12-14 14:46:39 EST
Created attachment 185162 [details]
Patch to overload the compareto event and make the sort more stable. 

This is a proposed fix. It overloads the compare to so that it not only checks the timestamp but also the file name. This will ensure that the order of read events will be the same. It is the first step in solving the issue if an inconsistent seek.
Comment 2 Matthew Khouzam CLA 2013-04-03 16:13:10 EDT
I believe it works in 2.0.
Comment 3 Patrick Tasse CLA 2013-05-24 13:35:14 EDT
This bug was for Legacy LTTng which is being removed in Linux Tools 2.0.