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

Bug 337857

Summary: [TMF] Refactoring of background requests
Product: z_Archived Reporter: Patrick Tasse <patrick.tasse>
Component: LinuxToolsAssignee: Francois Chouinard <fchouinard>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 301615    
Attachments:
Description Flags
Proposed patch in org.eclipse.linuxtools.tmf
fchouinard: iplog+
Updated patch fchouinard: iplog+

Description Patrick Tasse CLA 2011-02-22 11:09:37 EST
Build Identifier: 

The implementation of queueBackgroundRequest in TmfExperiment is moved to the superclass TmfDataProvider so that it can be used by TmfTrace.

The notification of trace updated during indexing of a TmfTrace is sent to the listeners at an interval equal to the cache size instead of a hardcoded default interval.

Unused method indexTraceOld is removed.


Reproducible: Always
Comment 1 Patrick Tasse CLA 2011-02-22 11:19:54 EST
Created attachment 189510 [details]
Proposed patch in org.eclipse.linuxtools.tmf

Legal Message: I, Patrick Tasse, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer to make this contribution under
the EPL.
Comment 2 Francois Chouinard CLA 2011-03-10 13:24:58 EST
Created attachment 190894 [details]
Updated patch

My understanding of the original patch is to promote queueBackgroundRequest() from TmfExperiment to TmfDataProvider (its ancestor class) and make it generally available to the other derived classes (TmfTrace among others).

This function is required for an internal tool and the intent is to not duplicate the TmfExperiment.queueBackgroundRequest() code to TmfTrace.

The main drawback of this solution is that LTTng's Statistics View background request no longer works and the statistics are no longer collected: the background request gets cancelled because it is of type TmfDataRequest while the event provider (LTTngSynthetcEventProvider) expects a TmfEventRequest. Modifying the request type from BACKGROUND to FOREGROUND works but doesn't take advantage of the request coalescing feature and has an adverse effect on LTTng's performance (~doubles initial processing time).

To refactor this code will require a bit of work.

In the mean time, assuming it is sufficient for the internal tracing tool, this patch simply duplicates the TmfExperiment code into TmfTrace.

This bug should not be closed as this is a temporary solution and that promoting this function to the base class is the way to go.
Comment 3 Francois Chouinard CLA 2011-03-29 18:28:32 EDT
Patch committed. Thanks Patrick.
Comment 4 Francois Chouinard CLA 2011-03-29 20:35:17 EDT
Oops. This bug was no to be closed until the "final" solution was put in place.
Comment 5 Patrick Tasse CLA 2013-05-21 14:36:09 EDT
Fixed with implementation of bug 353020.

Released in 0.9.0.