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

Bug 316455

Summary: [LTTng] State system minor improvements
Product: z_Archived Reporter: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Component: LinuxToolsAssignee: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: minor    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on:    
Bug Blocks: 301632    
Attachments:
Description Flags
proposed patch
none
Updated patch, following review comments
none
Updated patch, following rebase to latest of TRUNK as of 2010-10-13
none
Updated patch, following rebase to latest of TRUNK as of 2010-10-14 fchouinard: iplog+

Description Alvaro Sanchez-Leon CLA 2010-06-10 08:40:34 EDT
This Bug is a reminder to implement the following couple of small tasks

1) SyntheticEventProvider.java, replace the current three sub-request of trace level time ranges, for one sub-request of coalesced time ranges.

2) in the StateExperimentManger.java, optimise the dispatching of events to its corresponding trace by a comparing the trace references vs String path+name, (note, comparing references may not be trivial if trace clones are implemented as part of the solution)
Comment 1 Marc Dumais CLA 2010-09-02 15:02:22 EDT
Created attachment 178090 [details]
proposed patch

This patch tries to fix both parts of this bug report:
1) It replaces the multiple (one per trace) requests in LttngSyntheticEventProvider.java by one request of coalesced time ranges.  

2) Optimises the dispatching of events to its corresponding trace in StateExperimentManager.java by using the trace reference directly in the map as key.


 
Legal Message: I, Marc Dumais, 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 Alvaro Sanchez-Leon CLA 2010-09-13 13:58:17 EDT
The functionality is good and doing as expected, 
I have the following comments for the patch.

1) Remove unused import in LttngBaseEventRequest e.g. "ctrl-shift o"
import org.eclipse.linuxtools.lttng.state.trace.IStateTraceManager;

2) LttngBaseEventRequest, 
the "traceToTraceState" Map is used in LttngBaseEventRequest but via an extended inner instance  in LttngSyntheticEventProvider, 
    so it should be moved to and built in the LttngSyntheticEventProvider loop replacing traces[] and traceModels[] arrays, this instance shall then be used by any subsequent requests and only updated once per experiment selection.

3) LtttngSyntheticEventProvider 
	a) Map<IStateTraceManager, LttngBaseEventRequest> fEventProviderRequests
	The key is still in use but not the values i.e. single coalesced request, 
	this shall be replaced by a List<IStateTraceManager>
	
	b)	LttngBaseEventRequest subRequest
	   The syntheticAckIndicator does not seem to be needed any longer
	private LttngSyntheticEvent syntheticAckIndicator = null;
Comment 3 Marc Dumais CLA 2010-09-21 14:32:19 EDT
Created attachment 179334 [details]
Updated patch, following review comments

Hi Alvaro,

Thanks for the comments.  Find attached an updated patch, taking your comments into consideration.

Thanks,

Marc
Comment 4 Marc Dumais CLA 2010-10-13 08:40:00 EDT
Created attachment 180760 [details]
Updated patch, following rebase to latest of TRUNK as of 2010-10-13
Comment 5 Marc Dumais CLA 2010-10-14 09:57:53 EDT
Created attachment 180879 [details]
Updated patch, following rebase to latest of TRUNK as of 2010-10-14

Let's try this again :)
Comment 6 Francois Chouinard CLA 2010-10-14 11:38:06 EDT
Comment on attachment 180879 [details]
Updated patch, following rebase to latest of TRUNK as of 2010-10-14

Patch committed in Helios and Indigo
Comment 7 Francois Chouinard CLA 2010-10-14 11:38:26 EDT
Done.
Comment 8 Francois Chouinard CLA 2011-07-22 14:38:59 EDT
Delivered with 0.7