Fix for streaming and reconnection. Added standalone releng for lttng.
authorPatrick Tasse <patrick.tasse@gmail.com>
Tue, 14 Feb 2012 16:39:56 +0000 (11:39 -0500)
committerPatrick Tasse <patrick.tasse@gmail.com>
Tue, 14 Feb 2012 17:05:36 +0000 (12:05 -0500)
56 files changed:
org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/ActivateDebugging.java
org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/AllLTTngCoreTests.java
org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/LttngTestPreparation.java
org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventReferenceTest.java
org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventTypeTest.java
org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/model/LTTngTreeNodeTest.java
org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/state/TestStateManager.java
org.eclipse.linuxtools.lttng.core/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/LttngConstants.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngExperiment.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngTrace.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/ILttControllerService.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/LttControllerServiceProxy.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/utility/LiveTraceManager.java [new file with mode: 0644]
org.eclipse.linuxtools.lttng.help/Linux_Tools_Project/LTTng/User_Guide/Getting-Started.html
org.eclipse.linuxtools.lttng.releng-site/.gitignore [new file with mode: 0644]
org.eclipse.linuxtools.lttng.releng-site/.project [new file with mode: 0644]
org.eclipse.linuxtools.lttng.releng-site/category.xml [new file with mode: 0644]
org.eclipse.linuxtools.lttng.releng-site/pom.xml [new file with mode: 0644]
org.eclipse.linuxtools.lttng.ui.tests/stubs/org/eclipse/linuxtools/lttng/stubs/LTTngTimestampStub.java
org.eclipse.linuxtools.lttng.ui/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng.ui/plugin.xml
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/LTTngUiPlugin.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/model/trange/TimeRangeEventResource.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/TraceControlConstants.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureMarkers.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureTrace.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/CreateNewTrace.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ImportToProject.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/PauseTrace.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StartTrace.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StopTrace.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/connectorservice/TraceConnectorService.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/dialogs/ConfigureMarkersDialog.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/ProviderResourceAdapter.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TargetResourceAdapter.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TraceResourceAdapter.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/subsystems/TraceSubSystem.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/utility/DownloadProxy.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/histogram/HistogramRequest.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/StatisticsView.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/experiment/TmfExperiment.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfSignalManager.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomTxtTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomXmlTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/handlers/OpenExperimentHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
pom.xml

index 151868b969a418c7d76f47f87cfc4eddf12566c6..e3de2247eb93e52fdb10bf82ba1b9607bfb8b987 100644 (file)
@@ -66,7 +66,7 @@ public class AllLTTngCoreTests {
         // suite.addTestSuite(StateBeforeUpdateFactory.class);
         // suite.addTestSuite(StateBeforeUpdateHandlers.class);
         suite.addTestSuite(LTTngStateResourceTest.class);
-
+        
         // $JUnit-END$
         return suite;
     }
index 1ffa3276c5a4439b0240a5be94f21c5c1f58f2e0..015365af8936bec55e81bcc0e3e25b5e92506fae 100644 (file)
@@ -11,8 +11,8 @@ import org.eclipse.linuxtools.lttng.core.TraceDebug;
 import org.eclipse.linuxtools.lttng.core.control.LttngCoreProviderFactory;
 import org.eclipse.linuxtools.lttng.core.event.LttngEvent;
 import org.eclipse.linuxtools.lttng.core.event.LttngSyntheticEvent;
-import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
 import org.eclipse.linuxtools.lttng.core.event.LttngSyntheticEvent.SequenceInd;
+import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
 import org.eclipse.linuxtools.lttng.core.state.experiment.IStateExperimentManager;
 import org.eclipse.linuxtools.lttng.core.state.experiment.StateManagerFactory;
 import org.eclipse.linuxtools.lttng.core.trace.LTTngTextTrace;
index 47de6156cd34cdc090246b8a6dc63413fe0e54c8..42d259d639987c23670b6c368a44aeb1990c5e30 100644 (file)
@@ -4,6 +4,7 @@ import java.io.File;
 import java.net.URL;
 
 import junit.framework.TestCase;
+
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventReference;
index c1579235aa57dc965842192ca6b54e9613f128aa..5f1508e881b244cf8e3b4c251fe48e76c8457bde 100644 (file)
@@ -4,6 +4,7 @@ import java.io.File;
 import java.net.URL;
 
 import junit.framework.TestCase;
+
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventType;
index 91d1a6a5dcdaa4835206c7e56cd2affd888a5fc1..1ebb67fb8dea12a19b9fbc85b968c5a89c1db3a2 100644 (file)
  *******************************************************************************/
 package org.eclipse.linuxtools.lttng.core.tests.model;
 
-import org.eclipse.linuxtools.lttng.core.model.LTTngTreeNode;
-
 import junit.framework.TestCase;
 
+import org.eclipse.linuxtools.lttng.core.model.LTTngTreeNode;
+
 /**
  * @author alvaro
  *
index 1740d45a34b008e6c3cc5a8713ab548e58c2736d..edb00c415f530705c171b91c6d367259a7a25138 100644 (file)
@@ -14,8 +14,6 @@ package org.eclipse.linuxtools.lttng.core.tests.state;
 
 import junit.framework.TestCase;
 
-import org.eclipse.linuxtools.lttng.core.trace.LTTngTrace;
-
 /**
  * @author alvaro
  * 
index 1ac8175feb1befb4c8a8a790256e7b8cbca5696e..4080321cf5c66a9dbf89be4691f7431719525eee 100644 (file)
@@ -33,5 +33,6 @@ Export-Package: org.eclipse.linuxtools.lttng.core,
  org.eclipse.linuxtools.lttng.core.tracecontrol.model,
  org.eclipse.linuxtools.lttng.core.tracecontrol.model.config,
  org.eclipse.linuxtools.lttng.core.tracecontrol.service,
+ org.eclipse.linuxtools.lttng.core.tracecontrol.utility,
  org.eclipse.linuxtools.lttng.core.util
 Bundle-Localization: plugin
index cf39b948faf9a91f43075aed912b5870727e6d49..33e7725932dca1e6409460437dc5712223d95c8f 100644 (file)
@@ -178,6 +178,10 @@ public class LttngConstants {
      * <h4>LTTng trace control command to configure a network trace</h4> 
      */
     public static final String Lttng_Control_WriteTraceNetwork = "writeTraceNetwork";
+    /**
+     * <h4>LTTng trace control command to stop a network trace transfer</h4> 
+     */
+    public static final String Lttng_Control_StopWriteTraceNetwork = "stopWriteTraceNetwork";
     /**
      * <h4>LTTng trace control command to start tracing.</h4> 
      */
index 0cae078123826986a11a262ccc891994f54215a7..18eec012013867ffb84fd007fc97d970d9f2367e 100644 (file)
@@ -14,6 +14,7 @@ package org.eclipse.linuxtools.lttng.core.trace;
 
 import org.eclipse.linuxtools.lttng.core.event.LttngEvent;
 import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.utility.LiveTraceManager;
 import org.eclipse.linuxtools.lttng.jni.JniTrace;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
@@ -22,8 +23,8 @@ import org.eclipse.linuxtools.tmf.core.experiment.TmfExperiment;
 import org.eclipse.linuxtools.tmf.core.experiment.TmfExperimentContext;
 import org.eclipse.linuxtools.tmf.core.experiment.TmfExperimentLocation;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
-import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
+import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentRangeUpdatedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
@@ -202,7 +203,7 @@ public class LTTngExperiment<T extends TmfEvent> extends TmfExperiment<T> {
         for (ITmfTrace trace : fTraces) {
             if (trace instanceof LTTngTrace) {
                 JniTrace jniTrace = ((LTTngTrace) trace).getCurrentJniTrace();
-                if (jniTrace != null && !jniTrace.isLiveTraceSupported()) {
+                if (jniTrace != null && (!jniTrace.isLiveTraceSupported() || !LiveTraceManager.isLiveTrace(jniTrace.getTracepath()))) {
                     updateTimeRange();
                     TmfExperimentRangeUpdatedSignal signal = new TmfExperimentRangeUpdatedSignal(LTTngExperiment.this, LTTngExperiment.this,
                             getTimeRange());
index 9fdf11281aa5a8e506f45f28f36e0e9ccabc2392..5944b7c56b4e6d5633a379f2ce417e9eb8e9f521 100644 (file)
@@ -28,6 +28,7 @@ import org.eclipse.linuxtools.lttng.core.event.LttngEventType;
 import org.eclipse.linuxtools.lttng.core.event.LttngLocation;
 import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
 import org.eclipse.linuxtools.lttng.core.exceptions.LttngException;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.utility.LiveTraceManager;
 import org.eclipse.linuxtools.lttng.jni.JniEvent;
 import org.eclipse.linuxtools.lttng.jni.JniMarker;
 import org.eclipse.linuxtools.lttng.jni.JniTrace;
@@ -35,8 +36,13 @@ import org.eclipse.linuxtools.lttng.jni.JniTracefile;
 import org.eclipse.linuxtools.lttng.jni.common.JniTime;
 import org.eclipse.linuxtools.lttng.jni.exception.JniException;
 import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
+import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.experiment.TmfExperiment;
+import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
+import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
 import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpoint;
@@ -66,6 +72,7 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
     private final static boolean SHOW_LTT_DEBUG_DEFAULT = false;
     private final static boolean IS_PARSING_NEEDED_DEFAULT = !UniqueEvent;
     private final static int CHECKPOINT_PAGE_SIZE = 50000;
+    private final static long LTTNG_STREAMING_INTERVAL = 2000; // in ms
 
     // Reference to our JNI trace
     private JniTrace currentJniTrace;
@@ -91,6 +98,8 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
     
     private String traceLibPath;
 
+    private long fStreamingInterval = 0;
+
     public LTTngTrace() {
     }
 
@@ -152,17 +161,99 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
         // Set the currentEvent to the eventContent
         eventContent.setEvent(currentLttngEvent);
 
+        // // Bypass indexing if asked
+        // if ( bypassIndexing == false ) {
+        // indexTrace(true);
+        // }
+        // else {
+        // Even if we don't have any index, set ONE checkpoint
+        // fCheckpoints.add(new TmfCheckpoint(new LttngTimestamp(0L) , new
+        // LttngLocation() ) );
+
+        initializeStreamingMonitor();
+    }
+
+    private void initializeStreamingMonitor() {
+        JniTrace jniTrace = getCurrentJniTrace();
+        if (jniTrace == null || (!jniTrace.isLiveTraceSupported() || !LiveTraceManager.isLiveTrace(jniTrace.getTracepath()))) {
+            // Set the time range of the trace
+            TmfContext context = seekLocation(null);
+            LttngEvent event = getNextEvent(context);
+            LttngTimestamp startTime = new LttngTimestamp(event.getTimestamp());
+            LttngTimestamp endTime = new LttngTimestamp(currentJniTrace.getEndTime().getTime());
+            setTimeRange(new TmfTimeRange(startTime, endTime));
+            TmfTraceUpdatedSignal signal = new TmfTraceUpdatedSignal(this, this, getTimeRange());
+            broadcast(signal);
+            return;
+        }
+
         // Set the time range of the trace
         TmfContext context = seekLocation(null);
         LttngEvent event = getNextEvent(context);
-        LttngTimestamp startTime = new LttngTimestamp(event.getTimestamp());
-        LttngTimestamp endTime = new LttngTimestamp(currentJniTrace.getEndTime().getTime());
-
-        setTimeRange(new TmfTimeRange(startTime, endTime));
+        setEndTime(TmfTimestamp.BigBang);
+        final long startTime = event != null ? event.getTimestamp().getValue() : TmfTimestamp.BigBang.getValue();
+        fStreamingInterval = LTTNG_STREAMING_INTERVAL;
+
+        final Thread thread = new Thread("Streaming Monitor for trace " + getName()) { //$NON-NLS-1$
+            LttngTimestamp safeTimestamp = null;
+            TmfTimeRange timeRange = null;
+
+            @Override
+            public void run() {
+                while (!fExecutor.isShutdown()) {
+                    TmfExperiment<?> experiment = TmfExperiment.getCurrentExperiment();
+                    if (experiment != null) {
+                        final TmfEventRequest request = new TmfEventRequest<TmfEvent>(TmfEvent.class, TmfTimeRange.Eternity, 0, ExecutionType.FOREGROUND) {
+                            @Override
+                            public void handleCompleted() {
+                                updateJniTrace();
+                            }
+                        };
+                        synchronized (experiment) {
+                            experiment.sendRequest(request);
+                        }
+                        try {
+                            request.waitForCompletion();
+                        } catch (InterruptedException e) {
+                            e.printStackTrace();
+                        }
+                    } else {
+                        updateJniTrace();
+                    }
+                    try {
+                        Thread.sleep(LTTNG_STREAMING_INTERVAL);
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+            
+            private void updateJniTrace() {
+                JniTrace jniTrace = getCurrentJniTrace();
+                currentJniTrace.updateTrace();
+                long endTime = jniTrace.getEndTime().getTime();
+                LttngTimestamp startTimestamp = new LttngTimestamp(startTime);
+                LttngTimestamp endTimestamp = new LttngTimestamp(endTime);
+                if (safeTimestamp != null && safeTimestamp.compareTo(getTimeRange().getEndTime(), false) > 0) {
+                    timeRange = new TmfTimeRange(startTimestamp, safeTimestamp);
+                } else {
+                    timeRange = null;
+                }
+                safeTimestamp = endTimestamp;
+                if (timeRange != null) {
+                    setTimeRange(timeRange);
+                }
+            }
+        };
+        thread.start();
+    }
 
-        if (currentJniTrace == null) {
-            System.out.println("Problem");
-        }
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.trace.TmfTrace#getStreamingInterval()
+     */
+    @Override
+    public long getStreamingInterval() {
+        return fStreamingInterval;
     }
 
     /**
@@ -426,10 +517,6 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
             System.out.println("seekEvent(timestamp) timestamp -> " + timestamp); //$NON-NLS-1$
         }
 
-        if (currentJniTrace == null) {
-            System.out.println("aie");
-        }
-        
         // Call JNI to seek
         currentJniTrace.seekToTime(new JniTime(timestamp.getValue()));
 
index f7d73fa5dcae04df9e6a78541cd9b3bbbd5471a9..83c5fd9d87df0ccf3ae9a2c4f2f30cbf2e14cb98 100644 (file)
@@ -182,7 +182,7 @@ public interface ILttControllerService extends IService {
         void doneWriteTraceLocal(IToken token, Exception error, Object str);
     }
 
-    IToken writeTraceNetwork(String provider, String target, String trace, int numChannel, Boolean isAppend, Boolean isFlightRecorder, Boolean isNormalOnly, DoneWriteTraceNetwork done);
+    IToken writeTraceNetwork(String provider, String target, String trace, String path, int numChannel, Boolean isAppend, Boolean isFlightRecorder, Boolean isNormalOnly, DoneWriteTraceNetwork done);
 
     interface DoneWriteTraceNetwork {
         /**
@@ -195,6 +195,19 @@ public interface ILttControllerService extends IService {
         void doneWriteTraceNetwork(IToken token, Exception error, Object str);
     }
 
+    IToken stopWriteTraceNetwork(String provider, String target, String trace, DoneStopWriteTraceNetwork done);
+
+    interface DoneStopWriteTraceNetwork {
+        /**
+         * This method is called when stopWriteTraceNetwork() command is completed.
+         * 
+         * @param token - pending command handle.
+         * @param error - null if the command is successful.
+         * @param str - response of the agent
+         */
+        void doneStopWriteTraceNetwork(IToken token, Exception error, Object str);
+    }
+
     IToken allocTrace(String provider, String target, String trace, DoneAllocTrace done);
 
     interface DoneAllocTrace {
index d647e038302c41acb88d7de3630ef5dd4e33f3b7..073ffb3eb570010b5e6dde19b15a8e84fe46711a 100644 (file)
@@ -185,21 +185,15 @@ public class LttControllerServiceProxy implements ILttControllerService {
         return new Command(fProxychannel, this, LttngConstants.Lttng_Control_GetActiveTraceInfo, new Object[] { provider, target, trace }) {
             @Override
             public void done(Exception error, Object[] args) {
-                String[] retStrArray = new String[0];
+                String[] strArray = new String[0];
                 Object str = null;
                 if (error == null) {
                     assert args.length == INVALID_ARG_LENGTH;
                     error = toDetailedError(toError(args[0]), args[1]);
                     str = args[1];
-                    String[] strArray = toStringArray(str.toString());
-                    retStrArray = new String[strArray.length];
-
-                    for (int i = 0; i < strArray.length; i++) {
-                        String[] tempStr = strArray[i].split(LttngConstants.Lttng_Control_GetActiveTraceInfoSeparator);
-                        retStrArray[i] = tempStr[1];
-                    }
+                    strArray = toStringArray(str.toString());
                 }
-                done.doneGetActiveTraceInfo(token, error, retStrArray);
+                done.doneGetActiveTraceInfo(token, error, strArray);
             }
         }.token;
     }
@@ -457,8 +451,8 @@ public class LttControllerServiceProxy implements ILttControllerService {
      * @see org.eclipse.linuxtools.lttng.rse.service.ILttControllerService#writeTraceNetwork(java.lang.String, java.lang.String, java.lang.String, int, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean, org.eclipse.linuxtools.lttng.rse.service.ILttControllerService.DoneWriteTraceNetwork)
      */
     @Override
-    public IToken writeTraceNetwork(String provider, String target, String trace, int numChannel, Boolean isAppend, Boolean isFlightRecorder, Boolean isNormalOnly, final DoneWriteTraceNetwork done) {
-        return new Command(fProxychannel, this, LttngConstants.Lttng_Control_WriteTraceNetwork, new Object[] { provider, target, trace, numChannel, isAppend, isFlightRecorder, isNormalOnly }) {
+    public IToken writeTraceNetwork(String provider, String target, String trace, String path, int numChannel, Boolean isAppend, Boolean isFlightRecorder, Boolean isNormalOnly, final DoneWriteTraceNetwork done) {
+        return new Command(fProxychannel, this, LttngConstants.Lttng_Control_WriteTraceNetwork, new Object[] { provider, target, trace, path, numChannel, isAppend, isFlightRecorder, isNormalOnly }) {
             @Override
             public void done(Exception error, Object[] args) {
                 Object str = null;
@@ -472,6 +466,26 @@ public class LttControllerServiceProxy implements ILttControllerService {
         }.token;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.lttng.rse.service.ILttControllerService#stopWriteTraceNetwork(java.lang.String, java.lang.String, java.lang.String, org.eclipse.linuxtools.lttng.rse.service.ILttControllerService.DoneWriteTraceNetwork)
+     */
+    @Override
+    public IToken stopWriteTraceNetwork(String provider, String target, String trace, final DoneStopWriteTraceNetwork done) {
+        return new Command(fProxychannel, this, LttngConstants.Lttng_Control_StopWriteTraceNetwork, new Object[] { provider, target, trace }) {
+            @Override
+            public void done(Exception error, Object[] args) {
+                Object str = null;
+                if (error == null) {
+                    assert args.length == INVALID_ARG_LENGTH;
+                    error = toDetailedError(toError(args[0]), args[1]);
+                    str = args[1];
+                }
+                done.doneStopWriteTraceNetwork(token, error, str);
+            }
+        }.token;
+    }
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.lttng.rse.service.ILttControllerService#startTrace(java.lang.String, java.lang.String, java.lang.String, org.eclipse.linuxtools.lttng.rse.service.ILttControllerService.DoneStartTrace)
diff --git a/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/utility/LiveTraceManager.java b/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/utility/LiveTraceManager.java
new file mode 100644 (file)
index 0000000..a77575a
--- /dev/null
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Ericsson
+ * 
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng.core.tracecontrol.utility;
+
+import java.util.HashSet;
+
+public class LiveTraceManager {
+
+    private static final HashSet<String> fLiveTraceSet = new HashSet<String>();
+
+    public static void setLiveTrace(String tracePath, boolean live) {
+        if (live) {
+            fLiveTraceSet.add(tracePath);
+        } else {
+            fLiveTraceSet.remove(tracePath);
+        }
+    }
+
+    public static boolean isLiveTrace(String tracePath) {
+        return fLiveTraceSet.contains(tracePath);
+    }
+}
index efe07a300f84bc2576990d92c966804c0f8ceed1..2b5f2bfbc39416379f9b6ed0e0077ee603b4c609 100644 (file)
@@ -166,6 +166,10 @@ Configuration:
                        <b>make</b>. This will generate the 
                        <b>LTTng Agent Manual</b> in HTML format. Please follow the instructions in this manual for the manual installation of the agent. 
                </p>
+               <p><b>NOTE:</b> For TOSIDE release 0.8, the git source code in the <b>lttng-agent/agent</b>
+                       subdirectory must be replaced with the source code found in the TOSIDE installation
+                       archive before performing the manual installation.
+               </p>
                <p>To install an agent on Ubuntu using a PPA package follow the instruction of the web site 
                        <a href="https://launchpad.net/~lttng/+archive/ppa">LTTng PPA</a>. However, this version won't always include the latest bugfixes. To get the latest version, the user should download the source code, compile and install the agent manually.
                </p>
diff --git a/org.eclipse.linuxtools.lttng.releng-site/.gitignore b/org.eclipse.linuxtools.lttng.releng-site/.gitignore
new file mode 100644 (file)
index 0000000..8d94ef8
--- /dev/null
@@ -0,0 +1,5 @@
+bin
+@dot
+javaCompiler...args
+build.xml
+target
diff --git a/org.eclipse.linuxtools.lttng.releng-site/.project b/org.eclipse.linuxtools.lttng.releng-site/.project
new file mode 100644 (file)
index 0000000..5796a1d
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.linuxtools.lttng.releng-site</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.UpdateSiteBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.UpdateSiteNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.eclipse.linuxtools.lttng.releng-site/category.xml b/org.eclipse.linuxtools.lttng.releng-site/category.xml
new file mode 100644 (file)
index 0000000..1f92ca3
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site
+      mirrorsURL="http://www.eclipse.org/downloads/download.php?file=/technology/linuxtools/updates-nightly/site.xml&amp;format=xml">
+   <description url="http://download.eclipse.org/technology/linuxtools/updates-nightly">
+      Nightly builds of Linux Tools project.
+   </description>
+   <feature url="features/org.eclipse.linuxtools.lttng_0.4.0.qualifier.jar" id="org.eclipse.linuxtools.lttng" version="0.4.0.qualifier" os="linux" ws="*" arch="*">
+      <category name="LTTng"/>
+   </feature>
+   <category-def name="LTTng" label="Linux Tools LTTng">
+      <description>
+         Eclipse Linux Tools LTTng
+      </description>
+   </category-def>
+</site>
diff --git a/org.eclipse.linuxtools.lttng.releng-site/pom.xml b/org.eclipse.linuxtools.lttng.releng-site/pom.xml
new file mode 100644 (file)
index 0000000..3972c09
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2011 Ericsson
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+
+   Contributors:
+       Ericsson - initial implementation
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>linuxtools-lttng-parent</artifactId>
+    <groupId>org.eclipse.linuxtools.lttng</groupId>
+    <version>0.10.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.linuxtools.lttng.releng-site</artifactId>
+  <version>0.4.0-SNAPSHOT</version>
+  <name>Linux Tools LTTng Repository</name>
+  <packaging>eclipse-repository</packaging>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>deploy</id>
+            <phase>install</phase>
+              <goals>
+                <goal>run</goal>
+              </goals>
+              <configuration>
+              <tasks>
+                <delete includeemptydirs="false">
+                  <fileset
+                    dir="/var/www/technology/linuxtools/lttng/update-nightly/">
+                    <include name="**" />
+                  </fileset>
+                </delete>
+                <copy includeemptydirs="false"
+                  todir="/var/www/technology/linuxtools/lttng/update-nightly/">
+                  <fileset dir="target/repository">
+                    <include name="**" />
+                  </fileset>
+                </copy>
+              </tasks>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
index dd4957643b72814d04edb3461d42de0ebacf9a54..3326810a0d6b9f740b842a5284c7c29bb3f4e229 100644 (file)
@@ -15,7 +15,8 @@ public class LTTngTimestampStub extends TmfTimestamp {
     /**
         * 
         */
-       private static final long serialVersionUID = 216576768443708259L;
+       @SuppressWarnings("unused")
+    private static final long serialVersionUID = 216576768443708259L;
 
        /**
      * @param value
index 8cf889675b57d33eb9da72d5943894a10d640dbb..78c44cbfbed68524e31fd8bda0695f71f6f08382 100644 (file)
@@ -12,12 +12,12 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
  org.eclipse.core.runtime;bundle-version="3.7.0",
  org.eclipse.linuxtools.tmf.core;bundle-version="0.4.0",
  org.eclipse.linuxtools.tmf.ui;bundle-version="0.4.0",
- org.eclipse.linuxtools.lttng.core;bundle-version="0.4.0",
  org.eclipse.tm.tcf.core;bundle-version="0.4.0",
  org.eclipse.rse.core;bundle-version="3.2.0",
  org.eclipse.rse.services;bundle-version="3.2.100",
  org.eclipse.rse.subsystems.files.core;bundle-version="3.2.100",
- org.eclipse.rse.ui;bundle-version="3.2.0"
+ org.eclipse.rse.ui;bundle-version="3.2.0",
+ org.eclipse.linuxtools.lttng.core;bundle-version="0.4.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Bundle-Localization: plugin
index 988f3e8455d6e32638923345663c9d9273ed795c..93c6c19ce3d5a640cb2d9ce87160fd355b0c4175 100644 (file)
                 id="actions.trace.pause"
                 label="%action.pause.label"
                 menubarPath="additions"
-                tooltip="%action.puase.tooltip">
+                tooltip="%action.pause.tooltip">
              <enablement>
                 <and>
                    <objectClass
index ec1f5835b8a84ce6edbb3dacb9a5b3c6fb150285..08deda01443e0aa682fd1d7dbb6db65cb93827ad 100644 (file)
@@ -22,8 +22,8 @@ import org.eclipse.core.runtime.Platform;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.ProviderResource;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TargetResource;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.model.TraceAdapterFactory;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.model.TraceAdapterFactory;
 import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
 import org.eclipse.rse.services.clientserver.messages.SystemMessage;
 import org.eclipse.rse.ui.SystemBasePlugin;
index 14729fadfdbf696047075b84638b9261312d93d9..03727cbaaf1c6d5486e92e5adea7c35242415bb4 100644 (file)
@@ -13,6 +13,7 @@ package org.eclipse.linuxtools.lttng.ui.model.trange;
 \r
 import org.eclipse.linuxtools.lttng.core.state.model.LttngTraceState;\r
 \r
+\r
 /**\r
  * @author alvaro\r
  * \r
index afa80f231f88aec29488405e4e08b74496f27f8b..3e95577b196145d49a4032042c3e3f872673a49d 100644 (file)
@@ -13,6 +13,7 @@
 
 package org.eclipse.linuxtools.lttng.ui.tracecontrol;
 
+
 @SuppressWarnings("nls")
 public class TraceControlConstants {
 
@@ -31,6 +32,17 @@ public class TraceControlConstants {
     public static final String Lttng_Control_Unwrite_Trace_Data_Event = "unwrite_trace_data";
     public static final String Lttng_Control_Trace_Done_Event = "trace_done";
 
+    // the parameter names have to be coordinated with lttctltraceinfo.c in lttng-agent
+    public static final String ACTIVE_TRACE_INFO_PARAM_DESTINATION = "destination";
+    public static final String ACTIVE_TRACE_INFO_PARAM_NUM_THREAD = "numThread";
+    public static final String ACTIVE_TRACE_INFO_PARAM_NORMAL_ONLY = "normal_only";
+    public static final String ACTIVE_TRACE_INFO_PARAM_FLIGHT_ONLY = "flight_only";
+    public static final String ACTIVE_TRACE_INFO_PARAM_ENABLED = "enabled";
+
+    // the destination prefixes have to be coordinated with lttctlkerntransfer.c in lttng-agent
+    public static final String ACTIVE_TRACE_INFO_DESTINATION_PREFIX_LOCAL = "local:";
+    public static final String ACTIVE_TRACE_INFO_DESTINATION_PREFIX_NETWORK = "network:";
+
     // Default timeout for TCF tasks (in seconds)
     public static final int DEFAULT_TCF_TASK_TIMEOUT = 10;
 }
index f19f2063930a3ac0138700ba7ea35693ac435300..fbc871ce1497e5a5f2708b94d9211fd0032c549b 100644 (file)
@@ -25,8 +25,8 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TargetResource;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.dialogs.ConfigureMarkersDialog;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.subsystems.TraceSubSystem;
 import org.eclipse.rse.core.subsystems.ISubSystem;
index 324c85660893372a54cee3a2d49729f9f20df7b6..1de3979504d4340afbe183f264765b20bbc2613a 100644 (file)
@@ -28,8 +28,8 @@ import org.eclipse.linuxtools.lttng.core.tracecontrol.model.config.TraceChannels
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.config.TraceConfig;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.subsystems.TraceSubSystem;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.wizards.ConfigureTraceWizard;
 import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
index 01be4b955f0c41ee51b75168123d70043932fbcc..fcb36488752a63d610403e9ac3f1bb7da5043947 100644 (file)
@@ -275,7 +275,7 @@ public class CreateNewTrace implements IObjectActionDelegate, IWorkbenchWindowAc
                 public void run() {
 
                     // Setup trace location using Lttng controller service proxy
-                    service.writeTraceNetwork(targetResource.getParent().getName(), targetResource.getName(), traceConfig.getTraceName(),
+                    service.writeTraceNetwork(targetResource.getParent().getName(), targetResource.getName(), traceConfig.getTracePath(), traceConfig.getTraceName(),
                             traceConfig.getNumChannel(), traceConfig.getIsAppend(), traceConfig.getMode() == TraceConfig.FLIGHT_RECORDER_MODE,
                             traceConfig.getMode() == TraceConfig.NORMAL_MODE, new ILttControllerService.DoneWriteTraceNetwork() {
 
index 370fb857ff55ec0907e23f9585c54f07ce2db96b..246f6a83a41827b50e374b8a9b9cbd62220fe463 100644 (file)
@@ -30,8 +30,10 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource;
+import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.dialogs.ImportTraceDialog;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
 import org.eclipse.rse.core.RSECorePlugin;
 import org.eclipse.rse.core.model.IHost;
 import org.eclipse.rse.core.subsystems.ISubSystem;
@@ -246,33 +248,38 @@ public class ImportToProject implements IObjectActionDelegate, IWorkbenchWindowA
     /*
      * Method to create a symbolic link to a trace residing on the local host. 
      */
-       public static void linkTrace(Shell shell, TraceResource trace, IProject project, String traceName) {
-               IFolder traceFolder = project.getFolder(TRACE_FOLDER_NAME);
-               if (!traceFolder.exists()) {
-                       MessageDialog.openWarning(shell,
-                                       Messages.ImportToProject_ImportFailed,
-                                       Messages.ImportToProject_NoProjectTraceFolder);
-                       return;
-               }
-               
-               IFolder folder = traceFolder.getFolder(traceName);
-               if (folder.exists()) {
-                       MessageDialog.openWarning(shell,
-                                       Messages.ImportToProject_ImportFailed,
-                                       Messages.ImportToProject_AlreadyExists);
-                       return;
-               }
-               
-               File sourceFolder = new File(trace.getTraceConfig().getTracePath());
-               
-               try {
-                       folder.createLink(sourceFolder.toURI(), IResource.REPLACE, null);
-               } catch (CoreException e) {
-                       MessageDialog.openWarning(shell,
-                                       Messages.ImportToProject_ImportFailed,
-                                       e.getMessage());
-               }
-       }
+    public static void linkTrace(Shell shell, TraceResource trace, IProject project, String traceName) {
+        IFolder traceFolder = project.getFolder(TRACE_FOLDER_NAME);
+        if (!traceFolder.exists()) {
+            MessageDialog.openWarning(shell,
+                    Messages.ImportToProject_ImportFailed,
+                    Messages.ImportToProject_NoProjectTraceFolder);
+            return;
+        }
+
+        IFolder folder = traceFolder.getFolder(traceName);
+        if (folder.exists()) {
+            MessageDialog.openWarning(shell,
+                    Messages.ImportToProject_ImportFailed,
+                    Messages.ImportToProject_AlreadyExists);
+            return;
+        }
+
+        File sourceFolder = new File(trace.getTraceConfig().getTracePath());
+
+        try {
+            folder.createLink(sourceFolder.toURI(), IResource.REPLACE, null);
+            // Set the trace properties for this resource
+            // FIXME: update from extenstion point properties
+            folder.setPersistentProperty(TmfTraceElement.TRACEBUNDLE, LTTngUiPlugin.PLUGIN_ID);
+            folder.setPersistentProperty(TmfTraceElement.TRACETYPE, "org.eclipse.linuxtools.lttng.tracetype.kernel");
+            folder.setPersistentProperty(TmfTraceElement.TRACEICON, "icons/obj16/tux2.png");
+        } catch (CoreException e) {
+            MessageDialog.openWarning(shell,
+                    Messages.ImportToProject_ImportFailed,
+                    e.getMessage());
+        }
+    }
 
        /*
      * (non-Javadoc)
index 8bd85fc4ce7cdd83c83bb583ca0633f54ba6c2ca..ee3c9ddb7f2cbcf5581b8d0be130d99beb0650c8 100644 (file)
@@ -25,8 +25,8 @@ import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource.TraceState;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.subsystems.TraceSubSystem;
 import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
 import org.eclipse.rse.core.model.ISystemRegistry;
index 2e6311b274aa9b8439b56736d8353d260c61caf9..4676d7d70f8cd8b76ac902e259ae783a4706824b 100644 (file)
@@ -27,6 +27,7 @@ import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource.TraceState;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.config.TraceConfig;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.utility.LiveTraceManager;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
@@ -120,6 +121,10 @@ public class StartTrace implements IObjectActionDelegate, IWorkbenchWindowAction
 
                     trace.setTraceState(TraceState.STARTED);
 
+                    if (trace.isNetworkTraceAndStarted()) {
+                        LiveTraceManager.setLiveTrace(trace.getTraceConfig().getTracePath(), true);
+                    }
+
                     // Refresh display
                     ISystemRegistry registry = SystemStartHere.getSystemRegistry();
                     registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED, trace, trace.getParent(), subSystem, null);
@@ -278,6 +283,7 @@ public class StartTrace implements IObjectActionDelegate, IWorkbenchWindowAction
                     service.writeTraceNetwork(trace.getParent().getParent().getName(), 
                             trace.getParent().getName(), 
                             traceConfig.getTraceName(), 
+                            traceConfig.getTracePath(), 
                             traceConfig.getNumChannel(), 
                             traceConfig.getIsAppend(), 
                             false, 
index ea7aa8d07095ca7f04eae550c0ac48d1ced6d34c..2215bfb3a35d8142e0c212c80d7a5d3b3c85e10c 100644 (file)
@@ -25,6 +25,7 @@ import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource.TraceState;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.config.TraceConfig;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.utility.LiveTraceManager;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
@@ -122,7 +123,11 @@ public class StopTrace implements IObjectActionDelegate, IWorkbenchWindowActionD
                     }}.get(TraceControlConstants.DEFAULT_TCF_TASK_TIMEOUT, TimeUnit.SECONDS);
                     
                     trace.setTraceState(TraceState.STOPPED);
-                    
+
+                    if (trace.getTraceConfig() != null) {
+                        LiveTraceManager.setLiveTrace(trace.getTraceConfig().getTracePath(), false);
+                    }
+
                     ISystemRegistry registry = SystemStartHere.getSystemRegistry();
                     registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED, trace, trace.getParent(), subSystem, null);
 
@@ -212,6 +217,7 @@ public class StopTrace implements IObjectActionDelegate, IWorkbenchWindowActionD
                     service.writeTraceNetwork(trace.getParent().getParent().getName(), 
                             trace.getParent().getName(), 
                             traceConfig.getTraceName(), 
+                            traceConfig.getTracePath(), 
                             traceConfig.getNumChannel(), 
                             traceConfig.getIsAppend(), 
                             true, // write only flight recorder channels 
index 683bc31de51d7c880cf737db9b932cd69a92872e..fa14affabfae6dcfd49bde8d227e212cf73ac5ab 100644 (file)
@@ -20,11 +20,11 @@ import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
 import org.eclipse.linuxtools.lttng.core.LttngConstants;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.LttControllerServiceProxy;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.subsystems.TraceSubSystem;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.utility.DownloadProxy;
 import org.eclipse.rse.core.model.IHost;
index 5f1c0df0dc762ae6c66b0cf468a0e67fc55600a9..ca5866ac31b83c6a31ede065f7eb19480a2c1bb4 100644 (file)
@@ -20,8 +20,8 @@ import java.util.concurrent.TimeUnit;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TargetResource;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.subsystems.TraceSubSystem;
 import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
 import org.eclipse.rse.ui.SystemBasePlugin;
index 126ce365b3f4cc4712f17160c1e0dc04cd3baa97..9e33e85b91e945805efac707ad4464590ea5d33b 100644 (file)
@@ -19,8 +19,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.ProviderResource;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.subsystems.TraceSubSystem;
 import org.eclipse.rse.ui.SystemMenuManager;
 import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
index bd5ac07cbc9d60d7a43ad5deab124d9719a25777..de2d003b2db668e1502546746eb21aaa765a875c 100644 (file)
@@ -19,8 +19,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TargetResource;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.rse.ui.SystemMenuManager;
 import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
 import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
index 86c6755c355ecd6e4928cdb189170537a38d1908..9308d72b293811b020de4b6cccc2874a9312fc44 100644 (file)
@@ -25,8 +25,8 @@ import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource.PropertyInfo;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource.TraceState;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.rse.core.subsystems.ISubSystem;
 import org.eclipse.rse.ui.SystemMenuManager;
 import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
index efefd3f8673d9632706a64ad2bd60a4c4e0cf544..4fe301d3d4da2d9a99a81d18e45d173c738ffaaa 100644 (file)
@@ -13,6 +13,7 @@
  *******************************************************************************/
 package org.eclipse.linuxtools.lttng.ui.tracecontrol.subsystems;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Vector;
@@ -28,9 +29,11 @@ import org.eclipse.linuxtools.lttng.core.tracecontrol.model.TraceResource.TraceS
 import org.eclipse.linuxtools.lttng.core.tracecontrol.model.config.TraceConfig;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.ILttControllerService;
 import org.eclipse.linuxtools.lttng.core.tracecontrol.service.LttControllerServiceProxy;
+import org.eclipse.linuxtools.lttng.core.tracecontrol.utility.LiveTraceManager;
 import org.eclipse.linuxtools.lttng.ui.LTTngUiPlugin;
-import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.Messages;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.TraceControlConstants;
+import org.eclipse.linuxtools.lttng.ui.tracecontrol.actions.ImportToProject;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.actions.PauseTrace;
 import org.eclipse.linuxtools.lttng.ui.tracecontrol.connectorservice.TraceConnectorService;
 import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
@@ -490,13 +493,6 @@ public class TraceSubSystem extends SubSystem implements ICommunicationsListener
                     // get trace info
                     TraceConfig traceConfig;
 
-                    // Currently, if a trace is active then all the setup commands have been executed
-                    // and it's either started or paused. However, currently there is no means to retrieve
-                    // the state (paused or started). So we set it to state started (even if trace is not actually
-                    // started on target the command pause will be successful. However, the use will have the wrong
-                    // impression that the trace is started) Therefore ... the state needs to be retrievable.
-                    // TODO update to correct state if there is a possibility to retrieve the correct state. 
-                    trace.setTraceState(TraceState.STARTED);  
                     try {
                         final ILttControllerService service = getControllerService();
                         traceConfig = new TCFTask<TraceConfig>() {
@@ -506,7 +502,7 @@ public class TraceSubSystem extends SubSystem implements ICommunicationsListener
                                 service.getActiveTraceInfo(target.getParent().getName(), target.getName(), trace.getName(), new ILttControllerService.DoneGetActiveTraceInfo() {
 
                                     @Override
-                                    public void doneGetActiveTraceInfo(IToken token, Exception error, String[] str) {
+                                    public void doneGetActiveTraceInfo(IToken token, Exception error, String[] strArray) {
                                         if (error != null) {
                                             // Notify with error
                                             error(error);
@@ -514,35 +510,62 @@ public class TraceSubSystem extends SubSystem implements ICommunicationsListener
                                         }
 
                                         TraceConfig config = new TraceConfig();
+                                        config.setTraceName(trace.getName());
+                                        config.setTraceTransport(TraceControlConstants.Lttng_Trace_Transport_Relay); 
                                         config.setIsAppend(false); 
-                                        if (str[3].equals("true")) { //$NON-NLS-1$
-                                            config.setMode(TraceConfig.FLIGHT_RECORDER_MODE);    
-                                        }
-                                        else if (str[1].equals("true")) { //$NON-NLS-1$
-                                            config.setMode(TraceConfig.NORMAL_MODE);
+                                        for (String pair : strArray) {
+                                            String[] pairArray = pair.split(LttngConstants.Lttng_Control_GetActiveTraceInfoSeparator);
+                                            if (pairArray.length != 2) {
+                                                continue;
+                                            }
+                                            String param = pairArray[0];
+                                            String value = pairArray[1];
+                                            if (param.equals(TraceControlConstants.ACTIVE_TRACE_INFO_PARAM_DESTINATION)) {
+                                                if (value.startsWith(TraceControlConstants.ACTIVE_TRACE_INFO_DESTINATION_PREFIX_LOCAL)) {
+                                                    config.setNetworkTrace(false);
+                                                    config.setTracePath(value.substring(TraceControlConstants.ACTIVE_TRACE_INFO_DESTINATION_PREFIX_LOCAL.length()));
+                                                } else if (value.startsWith(TraceControlConstants.ACTIVE_TRACE_INFO_DESTINATION_PREFIX_NETWORK)) {
+                                                    config.setNetworkTrace(true);
+                                                    config.setTracePath(value.substring(TraceControlConstants.ACTIVE_TRACE_INFO_DESTINATION_PREFIX_NETWORK.length()));
+                                                }
+                                            } else if (param.equals(TraceControlConstants.ACTIVE_TRACE_INFO_PARAM_NUM_THREAD)) {
+                                                config.setNumChannel(Integer.valueOf(value));
+                                            } else if (param.equals(TraceControlConstants.ACTIVE_TRACE_INFO_PARAM_NORMAL_ONLY)) {
+                                                if (value.equals(Boolean.toString(true))) {
+                                                    config.setMode(TraceConfig.NORMAL_MODE);
+                                                }
+                                            } else if (param.equals(TraceControlConstants.ACTIVE_TRACE_INFO_PARAM_FLIGHT_ONLY)) {
+                                                if (value.equals(Boolean.toString(true))) {
+                                                    config.setMode(TraceConfig.FLIGHT_RECORDER_MODE);
+                                                }
+                                            } else if (param.equals(TraceControlConstants.ACTIVE_TRACE_INFO_PARAM_ENABLED)) {
+                                                if (value.equals(Boolean.toString(true))) {
+                                                    trace.setTraceState(TraceState.STARTED);
+                                                } else {
+                                                    trace.setTraceState(TraceState.PAUSED);  
+                                                }
+                                            }
                                         }
 
-                                        if (str[5].equals(TraceConfig.InvalidTracePath)) {
-                                            config.setNetworkTrace(true); 
-                                        }
-                                        else {
-                                            config.setNetworkTrace(false);
-                                        }
-                                        config.setNumChannel(Integer.valueOf(str[0]));
-                                        config.setTraceName(trace.getName());
-                                        config.setTracePath(str[5]);
-                                        config.setTraceTransport(TraceControlConstants.Lttng_Trace_Transport_Relay); 
-                                        
                                         // Notify with active trace list
                                         done(config);
                                     }
                                 });
                             }}.get(TraceControlConstants.DEFAULT_TCF_TASK_TIMEOUT, TimeUnit.SECONDS);
+                        trace.setTraceConfig(traceConfig);
+                        if (traceConfig != null) {
+                            if (traceConfig.isNetworkTrace()) {
+                                // stop and restart the network transfer since TCF channel may be different
+                                if (fProviders == null) { // do this only on startup, not on refresh
+                                    restartTraceNetwork(service, trace, traceConfig);
+                                }
+                                LiveTraceManager.setLiveTrace(traceConfig.getTracePath(), true);
+                            }
+                        }
                     } catch (Exception e) {
                         if (e instanceof SystemMessageException) throw (SystemMessageException)e;
                         throw new SystemMessageException(LTTngUiPlugin.getDefault().getMessage(e));
                     }
-                    trace.setTraceConfig(traceConfig);
                 }
             }
         }
@@ -643,4 +666,153 @@ public class TraceSubSystem extends SubSystem implements ICommunicationsListener
     public LttControllerServiceProxy getControllerService() throws Exception {
         return ((TraceConnectorService)getConnectorService()).getControllerService();
     }
+
+    /*
+     * Stop and restart the network transfer. Only normal channels are written while trace is started.  
+     */
+    private void restartTraceNetwork(final ILttControllerService service, final TraceResource trace, final TraceConfig traceConfig) throws Exception {
+        File newDir = new File(traceConfig.getTracePath());
+        if (!newDir.exists()) {
+            boolean created = newDir.mkdirs();
+            if (!created) {
+                throw new Exception(Messages.Lttng_Control_ErrorCreateTracePath + ": " + traceConfig.getTracePath()); //$NON-NLS-1$
+            }
+            if (traceConfig.getProject() != null) {
+                ImportToProject.linkTrace(getShell(), trace, traceConfig.getProject(), traceConfig.getTraceName());
+            }
+        }
+
+        // stop the previous lttd
+        boolean ok = new TCFTask<Boolean>() {
+            @Override
+            public void run() {
+
+                // Setup trace transport using Lttng controller service proxy
+                service.stopWriteTraceNetwork(trace.getParent().getParent().getName(), 
+                        trace.getParent().getName(), 
+                        traceConfig.getTraceName(), 
+                        new ILttControllerService.DoneStopWriteTraceNetwork() {
+
+                    @Override
+                    public void doneStopWriteTraceNetwork(IToken token, Exception error, Object str) {
+                        if (error != null) {
+                            // Notify with error
+                            error(error);
+                            return;
+                        }
+
+                        // Notify about success
+                        done(true);
+                    }
+                });
+            }}.get(TraceControlConstants.DEFAULT_TCF_TASK_TIMEOUT, TimeUnit.SECONDS);
+
+        if (!ok) {
+            return;
+        }
+
+        // lttd will only perform the shutdown after stopWriteTraceNetwork
+        // when it receives the next on_read_subbuffer callback
+
+        if (trace.getTraceState() == TraceState.PAUSED) {
+            // we need to start the trace to make sure that the network transfer is stopped
+            ok = new TCFTask<Boolean>() {
+                @Override
+                public void run() {
+
+                    // Start the trace
+                    service.startTrace(trace.getParent().getParent().getName(), 
+                            trace.getParent().getName(), 
+                            traceConfig.getTraceName(), 
+                            new ILttControllerService.DoneStartTrace() {
+
+                        @Override
+                        public void doneStartTrace(IToken token, Exception error, Object str) {
+                            if (error != null) {
+                                // Notify with error
+                                error(error);
+                                return;
+                            }
+
+                            // Notify about success
+                            done(true);
+                        }
+                    });
+                }}.get(TraceControlConstants.DEFAULT_TCF_TASK_TIMEOUT, TimeUnit.SECONDS);
+
+            if (!ok) {
+                return;
+            }
+
+            trace.setTraceState(TraceState.STARTED);
+
+            // wait for the lttd shutdown
+            Thread.sleep(1000);
+
+            // return to paused state
+            ok = new TCFTask<Boolean>() {
+                @Override
+                public void run() {
+
+                    // Pause the trace
+                    service.pauseTrace(trace.getParent().getParent().getName(), 
+                            trace.getParent().getName(), 
+                            traceConfig.getTraceName(), 
+                            new ILttControllerService.DonePauseTrace() {
+
+                        @Override
+                        public void donePauseTrace(IToken token, Exception error, Object str) {
+                            if (error != null) {
+                                // Notify with error
+                                error(error);
+                                return;
+                            }
+
+                            // Notify about success
+                            done(true);
+                        }
+                    });
+                }}.get(TraceControlConstants.DEFAULT_TCF_TASK_TIMEOUT, TimeUnit.SECONDS);
+
+            if (!ok) {
+                return;
+            }
+
+            trace.setTraceState(TraceState.PAUSED);
+
+        } else {
+            // wait for the lttd shutdown
+            Thread.sleep(1000);
+        }
+
+        // start a new lttd
+        new TCFTask<Boolean>() {
+            @Override
+            public void run() {
+
+                // Setup trace transport using Lttng controller service proxy
+                service.writeTraceNetwork(trace.getParent().getParent().getName(), 
+                        trace.getParent().getName(), 
+                        traceConfig.getTraceName(), 
+                        traceConfig.getTracePath(), 
+                        traceConfig.getNumChannel(), 
+                        traceConfig.getIsAppend(), 
+                        false, 
+                        true, // write only normal channels 
+                        new ILttControllerService.DoneWriteTraceNetwork() {
+
+                    @Override
+                    public void doneWriteTraceNetwork(IToken token, Exception error, Object str) {
+                        if (error != null) {
+                            // Notify with error
+                            error(error);
+                            return;
+                        }
+
+                        // Notify about success
+                        done(true);
+                    }
+                });
+            }}.get(TraceControlConstants.DEFAULT_TCF_TASK_TIMEOUT, TimeUnit.SECONDS);
+    }
 }
index cd09409d6b762c0bcfe7bd34659d5ae7d1556b2d..628e6c571ea0d34bead52b98086a085432214bb5 100644 (file)
@@ -72,7 +72,7 @@ public class DownloadProxy {
             if (trace != null) {
                 TraceConfig conf = trace.getTraceConfig();
                 FileOutputStream fos = null;
-                if (!TraceConfig.InvalidTracePath.equals(conf.getTracePath())) {
+                if (conf != null && !TraceConfig.InvalidTracePath.equals(conf.getTracePath())) {
                     String fileName = conf.getTracePath() + "/" + args[3].toString();  //$NON-NLS-1$
                     try {
                         fos = new FileOutputStream(fileName, true);
index 120d243298998bc6276abfd1b1657c5322594b5f..578b91c21f4a160c45a445967e40366124ae341e 100644 (file)
@@ -70,7 +70,6 @@ public class HistogramRequest extends TmfEventRequest<LttngEvent> {
 
     @Override
     public void handleCancel() {
-        fHistogram.clear();
         super.handleCancel();
     }
 
index 4ca1fef94933f1a2536aee648ad1313015f7d0c8..04306973058c5514b4d323e7ac2981344e544477 100644 (file)
@@ -120,6 +120,9 @@ public class StatisticsView extends AbsTimeUpdateView {
     private boolean fStatisticsUpdatePending = false;
     private TmfTimeRange fStatisticsUpdateRange = null;
     private final Object fStatisticsUpdateSyncObj = new Object();
+    private boolean fClearData = true;
+    // Flag to force request the data from trace
+    private boolean fRequestData = false;
 
        /**
         * Contains all the information necessary to build a column of the table.
@@ -487,6 +490,7 @@ public class StatisticsView extends AbsTimeUpdateView {
                        
                        @SuppressWarnings({ "rawtypes", "unchecked" })
                        TmfExperimentSelectedSignal<?> signal = new TmfExperimentSelectedSignal(this, experiment);
+                       fRequestData = true;
                        experimentSelected(signal);
                        
                } else {
@@ -672,7 +676,8 @@ public class StatisticsView extends AbsTimeUpdateView {
                                // The experiment root is already present
                                StatisticsTreeNode experimentTreeNode = StatisticsTreeRootFactory.getStatTreeRoot(experimentName);
 
-                               ITmfTrace[] traces = experiment.getTraces();
+                               @SuppressWarnings("rawtypes")
+                ITmfTrace[] traces = experiment.getTraces();
                                
                                LTTngTreeNode expNode = StateManagerFactory.getExperimentManager().getSelectedExperiment();
                                
@@ -721,7 +726,11 @@ public class StatisticsView extends AbsTimeUpdateView {
                        }
 
                        // if the data is not available or has changed, reload it
-                       requestData(experiment, experiment.getTimeRange(), true);
+                       fClearData = true;
+                       if(fRequestData) {
+                           requestData(experiment, experiment.getTimeRange(), fClearData);
+                           fRequestData = false;
+                       }
                }
        }
 
@@ -737,7 +746,8 @@ public class StatisticsView extends AbsTimeUpdateView {
                        return;
                }
 
-               requestData(experiment, signal.getRange(), false);
+               requestData(experiment, signal.getRange(), fClearData);
+               fClearData = false;
        }
 
        /**
@@ -761,7 +771,6 @@ public class StatisticsView extends AbsTimeUpdateView {
                        }
 
                        // send the initial request, to start filling up model
-                       //eventRequest(fStatisticsUpdateIndex, nbRequested, fStatisticsUpdateStartTime, clearingData, ExecutionType.BACKGROUND);
                        eventRequest(index, range, clearingData, ExecutionType.BACKGROUND);
                } else {
                        TraceDebug.debug("No selected experiment information available"); //$NON-NLS-1$
index 526bc8f145f047f1462943986f4ff7830ba37367..78be90757c6b6cd6396c69a0a6d3353cce763fca 100644 (file)
@@ -197,7 +197,7 @@ public abstract class TmfDataProvider<T extends TmfData> extends TmfComponent im
 
     protected void newCoalescedDataRequest(ITmfDataRequest<T> request) {
         synchronized (fLock) {
-            TmfCoalescedDataRequest<T> coalescedRequest = new TmfCoalescedDataRequest<T>(fType, request.getIndex(),
+            TmfCoalescedDataRequest<T> coalescedRequest = new TmfCoalescedDataRequest<T>(request.getDataType(), request.getIndex(),
                     request.getNbRequested(), request.getBlockSize(), request.getExecType());
             coalescedRequest.addRequest(request);
             if (Tracer.isRequestTraced()) {
@@ -271,7 +271,9 @@ public abstract class TmfDataProvider<T extends TmfData> extends TmfComponent im
                     while (data != null && !isCompleted(request, data, nbRead)) {
                         if (fLogData)
                             Tracer.traceEvent(provider, request, data);
-                        request.handleData(data);
+                        if (request.getDataType().isInstance(data)) {
+                            request.handleData(data);
+                        }
 
                         // To avoid an unnecessary read passed the last data
                         // requested
@@ -332,7 +334,9 @@ public abstract class TmfDataProvider<T extends TmfData> extends TmfComponent im
                         @Override
                         public void handleData(T data) {
                             super.handleData(data);
-                            request.handleData(data);
+                            if (request.getDataType().isInstance(data)) {
+                                request.handleData(data);
+                            }
                             if (getNbRead() > CHUNK_SIZE[0]) {
                                 System.out.println("ERROR - Read too many events"); //$NON-NLS-1$
                             }
index cb32ef5555583a155b88256437cc63ce81dff62b..1c043195426faa8f4af5c59bac1b4b275f6aa738 100644 (file)
@@ -112,7 +112,9 @@ public abstract class TmfEventProvider<T extends TmfEvent> extends TmfDataProvid
                                                @Override
                                                public void handleData(T data) {
                                                        super.handleData(data);
-                                                       request.handleData(data);
+                                                       if (request.getDataType().isInstance(data)) {
+                                                           request.handleData(data);
+                                                       }
                                                        if (this.getNbRead() > CHUNK_SIZE[0]) {
                                                                System.out.println("ERROR - Read too many events"); //$NON-NLS-1$
                                                        }
index 0c97bb59d0fcd990b27c6e99620de3f24634247f..5db175de624b47e8c6606cecb5d404fa1d65a0e4 100644 (file)
@@ -29,6 +29,7 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.signal.TmfEndSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentDisposedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentRangeUpdatedSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentSelectedSignal;
@@ -699,6 +700,72 @@ public class TmfExperiment<T extends TmfEvent> extends TmfEventProvider<T> imple
     // Indexing
     // ------------------------------------------------------------------------
 
+    private synchronized void initializeStreamingMonitor() {
+        if (getStreamingInterval() == 0) {
+            TmfContext context = seekLocation(null);
+            TmfEvent event = getNext(context);
+            if (event == null) {
+                return;
+            }
+            TmfTimeRange timeRange = new TmfTimeRange(event.getTimestamp(), TmfTimestamp.BigCrunch);
+            TmfExperimentRangeUpdatedSignal signal = new TmfExperimentRangeUpdatedSignal(this, this, timeRange);
+            broadcast(signal);
+            return;
+        }
+
+        final Thread thread = new Thread("Streaming Monitor for experiment " + getName()) { //$NON-NLS-1$
+            TmfTimestamp safeTimestamp = null;
+            TmfTimeRange timeRange = null;
+
+            @Override
+            public void run() {
+                while (!fExecutor.isShutdown()) {
+                    if (!isIndexingBusy()) {
+                        TmfTimestamp startTimestamp = TmfTimestamp.BigCrunch;
+                        TmfTimestamp endTimestamp = TmfTimestamp.BigBang;
+                        for (ITmfTrace<T> trace : fTraces) {
+                            if (trace.getStartTime().compareTo(startTimestamp) < 0) {
+                                startTimestamp = trace.getStartTime();
+                            }
+                            if (trace.getStreamingInterval() != 0 && trace.getEndTime().compareTo(endTimestamp) > 0) {
+                                endTimestamp = trace.getEndTime();
+                            }
+                        }
+                        if (safeTimestamp != null && safeTimestamp.compareTo(getTimeRange().getEndTime(), false) > 0) {
+                            timeRange = new TmfTimeRange(startTimestamp, safeTimestamp);
+                        } else {
+                            timeRange = null;
+                        }
+                        safeTimestamp = endTimestamp;
+                        if (timeRange != null) {
+                            TmfExperimentRangeUpdatedSignal signal =
+                                    new TmfExperimentRangeUpdatedSignal(TmfExperiment.this, TmfExperiment.this, timeRange);
+                            broadcast(signal);
+                        }
+                    }
+                    try {
+                        Thread.sleep(getStreamingInterval());
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        };
+        thread.start();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.trace.ITmfTrace#getStreamingInterval()
+     */
+    @Override
+    public long getStreamingInterval() {
+        long interval = 0;
+        for (ITmfTrace<T> trace : fTraces) {
+            interval = Math.max(interval, trace.getStreamingInterval());
+        }
+        return interval;
+    }
+
     /*
      * The experiment holds the globally ordered events of its set of traces. It is expected to provide access to each
      * individual event by index i.e. it must be possible to request the Nth event of the experiment.
@@ -713,6 +780,8 @@ public class TmfExperiment<T extends TmfEvent> extends TmfEventProvider<T> imple
     protected boolean fIndexing = false;
     protected TmfTimeRange fIndexingPendingRange = TmfTimeRange.Null;
 
+    private Integer fEndSynchReference;
+
 //     private static BufferedWriter fEventLog = null;
 //     private static BufferedWriter openLogFile(String filename) {
 //             BufferedWriter outfile = null;
@@ -847,7 +916,7 @@ public class TmfExperiment<T extends TmfEvent> extends TmfEventProvider<T> imple
 
     protected void notifyListeners() {
         broadcast(new TmfExperimentUpdatedSignal(this, this)); // , null));
-        broadcast(new TmfExperimentRangeUpdatedSignal(this, this, fTimeRange)); // , null));
+        //broadcast(new TmfExperimentRangeUpdatedSignal(this, this, fTimeRange)); // , null));
     }
 
     // ------------------------------------------------------------------------
@@ -859,14 +928,28 @@ public class TmfExperiment<T extends TmfEvent> extends TmfEventProvider<T> imple
         TmfExperiment<?> experiment = signal.getExperiment();
         if (experiment == this) {
             setCurrentExperiment(experiment);
-            indexExperiment(false);
+            fEndSynchReference = new Integer(signal.getReference());
+        }
+    }
+
+    @TmfSignalHandler
+    public void endSync(TmfEndSynchSignal signal) {
+        if (fEndSynchReference != null && fEndSynchReference.intValue() == signal.getReference()) {
+            fEndSynchReference = null;
+            initializeStreamingMonitor();
         }
+        
     }
 
     @TmfSignalHandler
     public void experimentUpdated(TmfExperimentUpdatedSignal signal) {
     }
 
+    @TmfSignalHandler
+    public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal) {
+        indexExperiment(false, (int) fNbEvents, signal.getRange());
+    }
+
     @TmfSignalHandler
     public void traceUpdated(TmfTraceUpdatedSignal signal) {
         for (ITmfTrace<T> trace : fTraces) {
index fc923b5036bec3a9d121c16114b453404440866e..96fe5ec6a671fab713e673402d5a1fb942c43979 100644 (file)
@@ -93,6 +93,7 @@ public class TmfCoalescedDataRequest<T extends TmfData> extends TmfDataRequest<T
                boolean ok = request.getIndex() == getIndex();
                ok &= request.getNbRequested()  == getNbRequested();
                ok &= request.getExecType()     == getExecType();
+               //ok &= request.getDataType()     == getDataType();
                
                return ok;
        }
@@ -110,7 +111,9 @@ public class TmfCoalescedDataRequest<T extends TmfData> extends TmfDataRequest<T
                if (getClass() == TmfCoalescedDataRequest.class) {
                for (ITmfDataRequest<T> request : fRequests) {
                    if (!request.isCompleted()) {
-                       request.handleData(data);
+                    if (request.getDataType().isInstance(data)) {
+                        request.handleData(data);
+                    }
                    }
                }
                }
index 13327067bde507e40552c26b0169f855a3889df6..313c8b1193913bc38253d69e81922c6b772fc6b8 100644 (file)
@@ -97,6 +97,7 @@ public class TmfCoalescedEventRequest<T extends TmfEvent> extends TmfCoalescedDa
                        boolean ok = getNbRequested() == request.getNbRequested();
                        ok &= getIndex() == request.getIndex();
                        ok &= getExecType() == request.getExecType();
+            //ok &= getDataType() == request.getDataType();
                        if (ok) {
                                TmfTimestamp startTime = ((ITmfEventRequest<T>) request).getRange().getStartTime();
                                TmfTimestamp endTime   = ((ITmfEventRequest<T>) request).getRange().getEndTime();
@@ -115,29 +116,33 @@ public class TmfCoalescedEventRequest<T extends TmfEvent> extends TmfCoalescedDa
     // ------------------------------------------------------------------------
 
     @Override
-       public void handleData(T data) {
-       super.handleData(data);
-       for (ITmfDataRequest<T> request : fRequests) {
-               if (data == null) {
-                       request.handleData(null);
-               } else {
-                       if (request instanceof TmfEventRequest<?>) {
-                               TmfEventRequest<T> req = (TmfEventRequest<T>) request;
-                                       if (!req.isCompleted()) {
-                                               TmfTimestamp ts = data.getTimestamp();
-                                       if (req.getRange().contains(ts)) {
-                                               req.handleData(data);
-                                       }
-                               }
-                       }
-                       else {
-                               TmfDataRequest<T> req = (TmfDataRequest<T>) request;
-                               if (!req.isCompleted()) {
-                                       req.handleData(data);
-                               }
-                       }
-               }
-       }
+    public void handleData(T data) {
+        super.handleData(data);
+        for (ITmfDataRequest<T> request : fRequests) {
+            if (data == null) {
+                request.handleData(null);
+            } else {
+                if (request instanceof TmfEventRequest<?>) {
+                    TmfEventRequest<T> req = (TmfEventRequest<T>) request;
+                    if (!req.isCompleted()) {
+                        TmfTimestamp ts = data.getTimestamp();
+                        if (req.getRange().contains(ts)) {
+                            if (req.getDataType().isInstance(data)) {
+                                req.handleData(data);
+                            }
+                        }
+                    }
+                }
+                else {
+                    TmfDataRequest<T> req = (TmfDataRequest<T>) request;
+                    if (!req.isCompleted()) {
+                        if (req.getDataType().isInstance(data)) {
+                            req.handleData(data);
+                        }
+                    }
+                }
+            }
+        }
     }
 
     // ------------------------------------------------------------------------
index 46581eb36e4eef5e01652a27883cbcc2667206bc..03e6218f56bf162764e4f32148578633733e0d66 100644 (file)
@@ -98,11 +98,11 @@ public class TmfSignalManager {
         */
        static int fSignalId = 0;
        static public synchronized void dispatchSignal(TmfSignal signal) {
-               fSignalId++;
-               sendSignal(new TmfStartSynchSignal(fSignalId));
-               signal.setReference(fSignalId);
+               int signalId = fSignalId++;
+               sendSignal(new TmfStartSynchSignal(signalId));
+               signal.setReference(signalId);
                sendSignal(signal);
-               sendSignal(new TmfEndSynchSignal(fSignalId));
+               sendSignal(new TmfEndSynchSignal(signalId));
        }
 
     static private void sendSignal(TmfSignal signal) {
index 920bf75a3b782caa1383d7ef446436ca70926eea..9ab76c4216a5299ebbbce8e6895d53c42e0a157c 100644 (file)
@@ -72,6 +72,11 @@ public interface ITmfTrace<T extends TmfEvent> extends ITmfComponent {
 
     public TmfTimestamp getEndTime();
 
+    /**
+     * @return the streaming interval in ms (0 if not streaming)
+     */
+    public long getStreamingInterval();
+
     /**
      * Positions the trace at the first event with the specified timestamp or index (i.e. the nth event in the trace).
      * 
index a81b9c37cfb2eebaa1c34724d18e34ded22d6404..a558eae126cb07786c4b0e85dc33cd60f605b5b5 100644 (file)
@@ -240,6 +240,14 @@ public abstract class TmfTrace<T extends TmfEvent> extends TmfEventProvider<T> i
         return fEndTime;
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.trace.ITmfTrace#getStreamingInterval()
+     */
+    @Override
+    public long getStreamingInterval() {
+        return 0;
+    }
+
     @SuppressWarnings("unchecked")
     public Vector<TmfCheckpoint> getCheckpoints() {
         return (Vector<TmfCheckpoint>) fCheckpoints.clone();
index e4bd564c76402c8d5b40253b35ed420c2010c6bd..1815155e2b8fb1abaf9ad2e189915b4396936544 100644 (file)
@@ -37,7 +37,8 @@ import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTraceDefinition.Inp
 public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {\r
 \r
     private static final TmfLocation<Long> NULL_LOCATION = new TmfLocation<Long>((Long) null);\r
-    \r
+    private static final int CACHE_SIZE = 100;\r
+\r
     private CustomTxtTraceDefinition fDefinition;\r
     private CustomTxtEventType fEventType;\r
 \r
@@ -52,7 +53,12 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {
         fEventType = new CustomTxtEventType(fDefinition);\r
     }\r
 \r
-       @Override\r
+    @Override\r
+    public void initTrace(String path, Class<CustomTxtEvent> eventType, boolean indexTrace) throws FileNotFoundException {\r
+        super.initTrace(path, eventType, CACHE_SIZE, indexTrace);\r
+    }\r
+\r
+    @Override\r
        @SuppressWarnings({ "unchecked", "rawtypes" })\r
        public ITmfTrace copy() {\r
         // TODO Auto-generated method stub\r
@@ -61,8 +67,6 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {
 \r
     @Override\r
     public TmfContext seekLocation(ITmfLocation<?> location) {\r
-        //System.out.println(Thread.currentThread().getName() + "::" + getName() + " seekLocation(" + ((location == null || location.getLocation() == null) ? "null" : location) + ")");\r
-        //new Throwable().printStackTrace();\r
         CustomTxtTraceContext context = new CustomTxtTraceContext(NULL_LOCATION, ITmfContext.INITIAL_RANK);\r
         if (NULL_LOCATION.equals(location) || !new File(getPath()).isFile()) {\r
             return context;\r
@@ -157,7 +161,6 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {
 \r
     @Override\r
     public TmfEvent parseEvent(TmfContext tmfContext) {\r
-        //System.out.println(Thread.currentThread().getName() + ":: " + getName() + " parseEvent(" + tmfContext.getRank() + " @ " + (tmfContext.getLocation().getLocation() == null ? "null" : tmfContext.getLocation()));\r
         if (!(tmfContext instanceof CustomTxtTraceContext)) {\r
             return null;\r
         }\r
index 9f8f2931a982463e299b9dc22a033e11d99fe645..767ddc0ea6e4e0f21b61736eabc8caf359289fba 100644 (file)
@@ -48,7 +48,8 @@ import org.xml.sax.SAXParseException;
 public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {\r
 \r
     private static final TmfLocation<Long> NULL_LOCATION = new TmfLocation<Long>((Long) null);\r
-    \r
+    private static final int CACHE_SIZE = 100;\r
+\r
     private CustomXmlTraceDefinition fDefinition;\r
     private CustomXmlEventType fEventType;\r
     private InputElement fRecordInputElement;\r
@@ -66,10 +67,13 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {
         fRecordInputElement = getRecordInputElement(fDefinition.rootInputElement);\r
     }\r
 \r
+    @Override\r
+    public void initTrace(String path, Class<CustomXmlEvent> eventType, boolean indexTrace) throws FileNotFoundException {\r
+        super.initTrace(path, eventType, CACHE_SIZE, indexTrace);\r
+    }\r
+\r
     @Override\r
     public TmfContext seekLocation(ITmfLocation<?> location) {\r
-        //System.out.println(Thread.currentThread().getName() + "::" + getName() + " seekLocation(" + ((location == null || location.getLocation() == null) ? "null" : location) + ")");\r
-        //new Throwable().printStackTrace();\r
         CustomXmlTraceContext context = new CustomXmlTraceContext(NULL_LOCATION, ITmfContext.INITIAL_RANK);\r
         if (NULL_LOCATION.equals(location) || !new File(getPath()).isFile()) {\r
             return context;\r
@@ -167,7 +171,6 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {
 \r
     @Override\r
     public TmfEvent parseEvent(TmfContext tmfContext) {\r
-        //System.out.println(Thread.currentThread().getName() + ":: " + getName() + " parseEvent(" + tmfContext.getRank() + " @ " + (tmfContext.getLocation().getLocation() == null ? "null" : tmfContext.getLocation()));\r
         if (!(tmfContext instanceof CustomXmlTraceContext)) {\r
             return null;\r
         }\r
index 7700bad2be0cbb8a8d137d9d0f20d9b74cd39443..9706752ec31463b940b13c2eb6535c7b802d983c 100644 (file)
@@ -99,21 +99,23 @@ public class OpenExperimentHandler extends AbstractHandler {
         // Instantiate the experiment's traces
         List<TmfTraceElement> traceEntries = fExperiment.getTraces();
         int nbTraces = traceEntries.size();
+        int cacheSize = Integer.MAX_VALUE;
         ITmfTrace<?>[] traces = new ITmfTrace[nbTraces];
         for (int i = 0; i < nbTraces; i++) {
             TmfTraceElement element = traceEntries.get(i);
             ITmfTrace trace = element.instantiateTrace();
             TmfEvent traceEvent = element.instantiateEvent();
             try {
-                trace.initTrace(element.getLocation().getPath(), traceEvent.getClass());
+                trace.initTrace(element.getLocation().getPath(), traceEvent.getClass(), false);
             } catch (FileNotFoundException e) {
                 displayErrorMsg(""); //$NON-NLS-1$
             }
+            cacheSize = Math.min(cacheSize, trace.getCacheSize());
             traces[i] = trace;
         }
 
         // Create the experiment and signal
-        TmfExperiment experiment = new TmfExperiment(traces[0].getClass(), fExperiment.getName(), traces, traces[0].getCacheSize());
+        TmfExperiment experiment = new TmfExperiment(TmfEvent.class, fExperiment.getName(), traces, cacheSize);
         TmfExperiment.setCurrentExperiment(experiment);
         TmfSignalManager.dispatchSignal(new TmfExperimentSelectedSignal(this, experiment));
 
index 30a4f6ca8c4dd2779b57fca8ba26c4f0b6d3e872..2e52f9b4bb0833d87e1e989af7e048d8664ea962 100644 (file)
@@ -53,10 +53,10 @@ import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterAndNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterMatchesNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterNode;\r
+import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;\r
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;\r
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;\r
-import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;\r
-import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentRangeUpdatedSignal;\r
+import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentUpdatedSignal;\r
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;\r
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;\r
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;\r
@@ -1541,7 +1541,7 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS
 //    }\r
 \r
     @TmfSignalHandler\r
-    public void experimentUpdated(TmfExperimentRangeUpdatedSignal signal) {\r
+    public void experimentUpdated(TmfExperimentUpdatedSignal signal) {\r
         if ((signal.getExperiment() != fTrace) || fTable.isDisposed())\r
             return;\r
         // Perform the refresh on the UI thread\r
index 7845053da15396bad4c83064aeb2b4f545158e8f..b6864ca8ab1e6c2921a93649fffa0900c12dd22a 100644 (file)
@@ -35,6 +35,7 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterAndNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterCompareNode;\r
+import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterCompareNode.Type;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterContainsNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterEqualsNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterEventTypeNode;\r
@@ -42,15 +43,12 @@ import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterMatchesNode;
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterOrNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterRootNode;\r
-import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterCompareNode.Type;\r
 import org.eclipse.linuxtools.tmf.core.util.TmfTraceType;\r
 import org.eclipse.linuxtools.tmf.ui.internal.Messages;\r
 import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTraceDefinition.OutputColumn;\r
 import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtEvent;\r
-import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTrace;\r
 import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTraceDefinition;\r
 import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomXmlEvent;\r
-import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomXmlTrace;\r
 import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomXmlTraceDefinition;\r
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.custom.SashForm;\r
index d03d11b6dc19d98573f041288427b588d7a4cecb..f5e81fba55c03a870322e5bdf33fda271a9d5368 100755 (executable)
@@ -87,6 +87,10 @@ public class TmfStatisticsView extends TmfView {
     protected TmfTimeRange fStatisticsUpdateRange = null;
     protected final Object fStatisticsUpdateSyncObj = new Object();
 
+    // Flag to force request the data from trace
+    protected boolean fRequestData = false; 
+
+    
     // Object to store the cursor while waiting for the experiment to load
     private Cursor fWaitCursor = null;
 
@@ -95,6 +99,7 @@ public class TmfStatisticsView extends TmfView {
 
     // Number of this instance. Used as an instance ID
     private int fInstanceNb;
+    
 
     /**
      * Constructor of a statistics view.
@@ -202,6 +207,7 @@ public class TmfStatisticsView extends TmfView {
         // Read current data if any available
         TmfExperiment<?> experiment = TmfExperiment.getCurrentExperiment();
         if (experiment != null) {
+            fRequestData = true;
             // Insert the statistics data into the tree
             @SuppressWarnings({ "rawtypes", "unchecked" })
             TmfExperimentSelectedSignal<?> signal = new TmfExperimentSelectedSignal(this, experiment);
@@ -345,9 +351,11 @@ public class TmfStatisticsView extends TmfView {
 
             // set input to a clean data model
             fTreeViewer.setInput(treeModelRoot);
-
-            // if the data is not available or has changed, reload it
-            requestData(experiment, experiment.getTimeRange());
+            
+            if (fRequestData) {
+                requestData(experiment, experiment.getTimeRange());
+                fRequestData = false;
+            }
         }
     }
 
diff --git a/pom.xml b/pom.xml
index 901696a72e5ba276f6e9d3c13a185f13fb5bbfb4..f4c19b05208da9461ec5f09256cbd1fb96a73efb 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <module>org.eclipse.linuxtools.lttng.core.tests</module>
       </modules>
   </profile>
-
+  
+  <profile>
+    <id>lttngPackage</id>
+      <modules>
+        <module>org.eclipse.linuxtools.lttng.releng-site</module>
+      </modules>
+  </profile> 
+       
 </profiles>
 
   <build>
This page took 0.058516 seconds and 5 git commands to generate.