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

Bug 324876

Summary: [LTTng] Experiment indexing issue
Product: z_Archived Reporter: Francois Chouinard <fchouinard>
Component: LinuxToolsAssignee: Francois Chouinard <fchouinard>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 290046    
Attachments:
Description Flags
Temporary fix fchouinard: iplog-

Description Francois Chouinard CLA 2010-09-09 13:33:49 EDT
When fixing the events view, I noticed that LTTng experiments don't report the right number of events. The total number of events is calculated when indexing the traces (i.e. creating the experiment checkpoints).

It turns out that background requests (e.g. indexing the experiment) are broken into sub-requests to provide "slots" so that foreground requests (UI related) can be executed more dynamically. To "optimize" things, the sub-request are set to coincide with the experiment checkpoints so the experiment can be positioned rapidly for each sub-request.

The problem comes from the way the LTTng trace location is handled (location + various flags). When building the checkpoints, the location that is stored is actually the location of the *previous* event along with the flags meaning that event was read and that the actual event is the next one (yes, LTTng sucks...). When restoring the checkpoint,  the flags are not correctly handled and we end up re-reading the previous event. This is not such a big deal since this particular problem only occurs  when indexing the (LTTng) experiment.

The quick timestamp fix is quite simple - adjust the TS before storing the checkpoint - but it breaks the other, "well-behaved" applications :-(
Comment 1 Francois Chouinard CLA 2010-09-09 13:43:28 EDT
Created attachment 178539 [details]
Temporary fix

Temporary fix: create LTTngExperiment class (which extends the TmfExperiment base class) and provide the quick and dirty fix.
Comment 2 Francois Chouinard CLA 2010-09-09 13:57:15 EDT
Comment on attachment 178539 [details]
Temporary fix

Patch committed to Indigo
Comment 3 Francois Chouinard CLA 2010-09-09 14:31:55 EDT
Patch committed to Helios
Comment 4 Francois Chouinard CLA 2010-10-26 16:46:15 EDT
Good enough for Helios. For Indigo, we will re-assess after revisiting the TmfContext API.
Comment 5 Francois Chouinard CLA 2011-07-22 14:48:15 EDT
Delivered with 0.7