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

Bug 333486

Summary: [LTTng] Set current event in Histogram View not working properly after zooming
Product: z_Archived Reporter: Bernd Hufmann <bernd.hufmann>
Component: LinuxToolsAssignee: Bernd Hufmann <bernd.hufmann>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3 CC: jjohnstn
Version: unspecifiedFlags: fchouinard: review+
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Example trace file
jjohnstn: iplog-
Fix for bug
none
Fix for setting of current Event jjohnstn: iplog+

Description Bernd Hufmann CLA 2011-01-04 10:45:33 EST
Created attachment 186013 [details]
Example trace file

After zooming to a very small time range (e.g. 0.00001 sec), setting to a current event in histogram view (HV) doesn't work properly. After setting to a certain event time, a different event than the previously specified event is selected and all views are synchronized to this different time. This makes it difficult to look at single events.

To reproduce:

- Load the attached trace in Eclipse
- In HV, set "Window Span (sec)" to 0.00001
- In HV, set "Current Event (sec)" to 205.868239395
- After that the "Current Event (sec)" will change to a different time than just 
  specified (in my environment it's 205.866879106)
Comment 1 Bernd Hufmann CLA 2011-01-04 11:53:12 EST
Created attachment 186027 [details]
Fix for bug

This patch fixes the problem reported in the bug. 

Problem analysis:
When setting the current event time and the current time is outside the current window in small window of the histogram view, the histogram view tries to adjust the window to include the new current event time. For that it bases the start time on the big window of the histogram view. Each column in the big window combines events for certain time range. This time range depends on the time range of the whole window. If this time range is bigger than the window span of the small histogram view, then the setting of the current event time will be based on the start time of this event range of a specific column. This moves the window of the small histogram view, so that the new current event is not part of it anymore.

Fix:
The fix for the problem above, is to not base the new time range of the small window of the histogram view on the start time of the event range of one column in the big window of the histogram view. Instead, set the window based on the actual new current event time.
Comment 2 Bernd Hufmann CLA 2011-01-07 09:59:35 EST
Created attachment 186278 [details]
Fix for setting of current Event

This patch augments previously submitted patch 186027. It adds further time range validation when updating the event time. Additionally, it sets the selected event time in the CFV after receiving the new current time from the HV.
Comment 3 Bernd Hufmann CLA 2011-01-10 10:24:08 EST
Hi Francois
Could you please review the latest patch before I commit it?
Thank you!
Comment 4 Francois Chouinard CLA 2011-01-11 18:08:40 EST
Looks (and works) great!
Comment 5 Bernd Hufmann CLA 2011-01-12 16:07:08 EST
Comment on attachment 186278 [details]
Fix for setting of current Event

Patch committed!
Comment 6 Bernd Hufmann CLA 2011-01-12 16:12:46 EST
Bug fixed with attachment 186278 [details].
Comment 7 Francois Chouinard CLA 2011-07-22 14:58:03 EDT
Delivered with 0.8