Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337857 - [TMF] Refactoring of background requests
Summary: [TMF] Refactoring of background requests
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LinuxTools (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Francois Chouinard CLA
QA Contact: Francois Chouinard CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 301615
  Show dependency tree
 
Reported: 2011-02-22 11:09 EST by Patrick Tasse CLA
Modified: 2022-01-13 14:53 EST (History)
0 users

See Also:


Attachments
Proposed patch in org.eclipse.linuxtools.tmf (9.69 KB, patch)
2011-02-22 11:19 EST, Patrick Tasse CLA
fchouinard: iplog+
Details | Diff
Updated patch (7.51 KB, patch)
2011-03-10 13:24 EST, Francois Chouinard CLA
fchouinard: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.