Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2012-02-14 16:39:56 +0000
committerPatrick Tasse2012-02-14 17:05:36 +0000
commitb60a1816ffdc7562e51d385be41c76930cb6b48a (patch)
tree7893fa7e9bfa3940b6a446341cfddd8577c7abc2
parentff3352b8038e3e989229be91c4ee0f76e49849d9 (diff)
downloadorg.eclipse.linuxtools-b60a1816ffdc7562e51d385be41c76930cb6b48a.tar.gz
org.eclipse.linuxtools-b60a1816ffdc7562e51d385be41c76930cb6b48a.tar.xz
org.eclipse.linuxtools-b60a1816ffdc7562e51d385be41c76930cb6b48a.zip
Fix for streaming and reconnection. Added standalone releng for lttng.
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/ActivateDebugging.java1
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/AllLTTngCoreTests.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/LttngTestPreparation.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventReferenceTest.java1
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventTypeTest.java1
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/model/LTTngTreeNodeTest.java4
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/state/TestStateManager.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/META-INF/MANIFEST.MF1
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/LttngConstants.java4
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngExperiment.java5
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngTrace.java109
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/ILttControllerService.java15
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/LttControllerServiceProxy.java36
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/utility/LiveTraceManager.java33
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.help/Linux_Tools_Project/LTTng/User_Guide/Getting-Started.html4
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.releng-site/.gitignore5
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.releng-site/.project17
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.releng-site/category.xml15
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.releng-site/pom.xml63
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui.tests/stubs/org/eclipse/linuxtools/lttng/stubs/LTTngTimestampStub.java3
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/META-INF/MANIFEST.MF4
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/plugin.xml2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/LTTngUiPlugin.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/model/trange/TimeRangeEventResource.java1
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/TraceControlConstants.java12
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureMarkers.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureTrace.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/CreateNewTrace.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ImportToProject.java61
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/PauseTrace.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StartTrace.java6
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StopTrace.java8
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/connectorservice/TraceConnectorService.java4
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/dialogs/ConfigureMarkersDialog.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/ProviderResourceAdapter.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TargetResourceAdapter.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TraceResourceAdapter.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/subsystems/TraceSubSystem.java224
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/utility/DownloadProxy.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/histogram/HistogramRequest.java1
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/StatisticsView.java17
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java10
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java4
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/experiment/TmfExperiment.java87
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java5
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java51
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfSignalManager.java8
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java5
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java8
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomTxtTrace.java13
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomXmlTrace.java11
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/handlers/OpenExperimentHandler.java6
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java6
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java4
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java14
-rw-r--r--lttng/pom.xml9
56 files changed, 763 insertions, 161 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/ActivateDebugging.java b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/ActivateDebugging.java
index 178c16f1d5..2c30c9defd 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/ActivateDebugging.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/ActivateDebugging.java
@@ -12,3 +12,4 @@ public class ActivateDebugging {
TraceDebug.setDEBUG(false);
}
}
+
diff --git a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/AllLTTngCoreTests.java b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/AllLTTngCoreTests.java
index 151868b969..e3de2247eb 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/AllLTTngCoreTests.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/AllLTTngCoreTests.java
@@ -66,7 +66,7 @@ public class AllLTTngCoreTests {
// suite.addTestSuite(StateBeforeUpdateFactory.class);
// suite.addTestSuite(StateBeforeUpdateHandlers.class);
suite.addTestSuite(LTTngStateResourceTest.class);
-
+
// $JUnit-END$
return suite;
}
diff --git a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/LttngTestPreparation.java b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/LttngTestPreparation.java
index 1ffa3276c5..015365af89 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/LttngTestPreparation.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/LttngTestPreparation.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventReferenceTest.java b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventReferenceTest.java
index 47de6156cd..42d259d639 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventReferenceTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventReferenceTest.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventTypeTest.java b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventTypeTest.java
index c1579235aa..5f1508e881 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventTypeTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventTypeTest.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/model/LTTngTreeNodeTest.java b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/model/LTTngTreeNodeTest.java
index 91d1a6a5dc..1ebb67fb8d 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/model/LTTngTreeNodeTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/model/LTTngTreeNodeTest.java
@@ -11,10 +11,10 @@
*******************************************************************************/
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
*
diff --git a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/state/TestStateManager.java b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/state/TestStateManager.java
index 1740d45a34..edb00c415f 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/state/TestStateManager.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/state/TestStateManager.java
@@ -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
*
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/META-INF/MANIFEST.MF b/lttng/org.eclipse.linuxtools.lttng.core/META-INF/MANIFEST.MF
index 1ac8175feb..4080321cf5 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core/META-INF/MANIFEST.MF
+++ b/lttng/org.eclipse.linuxtools.lttng.core/META-INF/MANIFEST.MF
@@ -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
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/LttngConstants.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/LttngConstants.java
index cf39b948fa..33e7725932 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/LttngConstants.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/LttngConstants.java
@@ -179,6 +179,10 @@ public class LttngConstants {
*/
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>
*/
public static final String Lttng_Control_StartTrace = "startTrace";
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngExperiment.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngExperiment.java
index 0cae078123..18eec01201 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngExperiment.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngExperiment.java
@@ -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());
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngTrace.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngTrace.java
index 9fdf11281a..5944b7c56b 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngTrace.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngTrace.java
@@ -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()));
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/ILttControllerService.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/ILttControllerService.java
index f7d73fa5dc..83c5fd9d87 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/ILttControllerService.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/ILttControllerService.java
@@ -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 {
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/LttControllerServiceProxy.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/LttControllerServiceProxy.java
index d647e03830..073ffb3eb5 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/LttControllerServiceProxy.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/service/LttControllerServiceProxy.java
@@ -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;
@@ -474,6 +468,26 @@ public class LttControllerServiceProxy implements ILttControllerService {
/*
* (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)
*/
@Override
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/utility/LiveTraceManager.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/utility/LiveTraceManager.java
new file mode 100644
index 0000000000..a77575a56c
--- /dev/null
+++ b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/tracecontrol/utility/LiveTraceManager.java
@@ -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);
+ }
+}
diff --git a/lttng/org.eclipse.linuxtools.lttng.help/Linux_Tools_Project/LTTng/User_Guide/Getting-Started.html b/lttng/org.eclipse.linuxtools.lttng.help/Linux_Tools_Project/LTTng/User_Guide/Getting-Started.html
index efe07a300f..2b5f2bfbc3 100644
--- a/lttng/org.eclipse.linuxtools.lttng.help/Linux_Tools_Project/LTTng/User_Guide/Getting-Started.html
+++ b/lttng/org.eclipse.linuxtools.lttng.help/Linux_Tools_Project/LTTng/User_Guide/Getting-Started.html
@@ -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/lttng/org.eclipse.linuxtools.lttng.releng-site/.gitignore b/lttng/org.eclipse.linuxtools.lttng.releng-site/.gitignore
new file mode 100644
index 0000000000..8d94ef8deb
--- /dev/null
+++ b/lttng/org.eclipse.linuxtools.lttng.releng-site/.gitignore
@@ -0,0 +1,5 @@
+bin
+@dot
+javaCompiler...args
+build.xml
+target
diff --git a/lttng/org.eclipse.linuxtools.lttng.releng-site/.project b/lttng/org.eclipse.linuxtools.lttng.releng-site/.project
new file mode 100644
index 0000000000..5796a1d714
--- /dev/null
+++ b/lttng/org.eclipse.linuxtools.lttng.releng-site/.project
@@ -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/lttng/org.eclipse.linuxtools.lttng.releng-site/category.xml b/lttng/org.eclipse.linuxtools.lttng.releng-site/category.xml
new file mode 100644
index 0000000000..1f92ca3d8d
--- /dev/null
+++ b/lttng/org.eclipse.linuxtools.lttng.releng-site/category.xml
@@ -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/lttng/org.eclipse.linuxtools.lttng.releng-site/pom.xml b/lttng/org.eclipse.linuxtools.lttng.releng-site/pom.xml
new file mode 100644
index 0000000000..3972c09a7e
--- /dev/null
+++ b/lttng/org.eclipse.linuxtools.lttng.releng-site/pom.xml
@@ -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>
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui.tests/stubs/org/eclipse/linuxtools/lttng/stubs/LTTngTimestampStub.java b/lttng/org.eclipse.linuxtools.lttng.ui.tests/stubs/org/eclipse/linuxtools/lttng/stubs/LTTngTimestampStub.java
index dd4957643b..3326810a0d 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui.tests/stubs/org/eclipse/linuxtools/lttng/stubs/LTTngTimestampStub.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui.tests/stubs/org/eclipse/linuxtools/lttng/stubs/LTTngTimestampStub.java
@@ -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
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/META-INF/MANIFEST.MF b/lttng/org.eclipse.linuxtools.lttng.ui/META-INF/MANIFEST.MF
index 8cf889675b..78c44cbfbe 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/META-INF/MANIFEST.MF
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/META-INF/MANIFEST.MF
@@ -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
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/plugin.xml b/lttng/org.eclipse.linuxtools.lttng.ui/plugin.xml
index 988f3e8455..93c6c19ce3 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/plugin.xml
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/plugin.xml
@@ -596,7 +596,7 @@
id="actions.trace.pause"
label="%action.pause.label"
menubarPath="additions"
- tooltip="%action.puase.tooltip">
+ tooltip="%action.pause.tooltip">
<enablement>
<and>
<objectClass
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/LTTngUiPlugin.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/LTTngUiPlugin.java
index ec1f5835b8..08deda0144 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/LTTngUiPlugin.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/LTTngUiPlugin.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/model/trange/TimeRangeEventResource.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/model/trange/TimeRangeEventResource.java
index 14729fadfd..03727cbaaf 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/model/trange/TimeRangeEventResource.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/model/trange/TimeRangeEventResource.java
@@ -13,6 +13,7 @@ package org.eclipse.linuxtools.lttng.ui.model.trange;
import org.eclipse.linuxtools.lttng.core.state.model.LttngTraceState;
+
/**
* @author alvaro
*
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/TraceControlConstants.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/TraceControlConstants.java
index afa80f231f..3e95577b19 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/TraceControlConstants.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/TraceControlConstants.java
@@ -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;
}
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureMarkers.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureMarkers.java
index f19f206393..fbc871ce14 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureMarkers.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureMarkers.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureTrace.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureTrace.java
index 324c856608..1de3979504 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureTrace.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ConfigureTrace.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/CreateNewTrace.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/CreateNewTrace.java
index 01be4b955f..fcb3648875 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/CreateNewTrace.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/CreateNewTrace.java
@@ -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() {
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ImportToProject.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ImportToProject.java
index 370fb857ff..246f6a83a4 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ImportToProject.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/ImportToProject.java
@@ -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)
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/PauseTrace.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/PauseTrace.java
index 8bd85fc4ce..ee3c9ddb7f 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/PauseTrace.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/PauseTrace.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StartTrace.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StartTrace.java
index 2e6311b274..4676d7d70f 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StartTrace.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StartTrace.java
@@ -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,
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StopTrace.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StopTrace.java
index ea7aa8d070..2215bfb3a3 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StopTrace.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/actions/StopTrace.java
@@ -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
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/connectorservice/TraceConnectorService.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/connectorservice/TraceConnectorService.java
index 683bc31de5..fa14affabf 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/connectorservice/TraceConnectorService.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/connectorservice/TraceConnectorService.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/dialogs/ConfigureMarkersDialog.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/dialogs/ConfigureMarkersDialog.java
index 5f1c0df0dc..ca5866ac31 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/dialogs/ConfigureMarkersDialog.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/dialogs/ConfigureMarkersDialog.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/ProviderResourceAdapter.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/ProviderResourceAdapter.java
index 126ce365b3..9e33e85b91 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/ProviderResourceAdapter.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/ProviderResourceAdapter.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TargetResourceAdapter.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TargetResourceAdapter.java
index bd5ac07cbc..de2d003b2d 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TargetResourceAdapter.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TargetResourceAdapter.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TraceResourceAdapter.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TraceResourceAdapter.java
index 86c6755c35..9308d72b29 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TraceResourceAdapter.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/model/TraceResourceAdapter.java
@@ -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;
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/subsystems/TraceSubSystem.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/subsystems/TraceSubSystem.java
index efefd3f867..4fe301d3d4 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/subsystems/TraceSubSystem.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/subsystems/TraceSubSystem.java
@@ -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);
+ }
}
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/utility/DownloadProxy.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/utility/DownloadProxy.java
index cd09409d6b..628e6c571e 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/utility/DownloadProxy.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/tracecontrol/utility/DownloadProxy.java
@@ -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);
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/histogram/HistogramRequest.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/histogram/HistogramRequest.java
index 120d243298..578b91c21f 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/histogram/HistogramRequest.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/histogram/HistogramRequest.java
@@ -70,7 +70,6 @@ public class HistogramRequest extends TmfEventRequest<LttngEvent> {
@Override
public void handleCancel() {
- fHistogram.clear();
super.handleCancel();
}
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/StatisticsView.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/StatisticsView.java
index 4ca1fef949..0430697305 100644
--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/StatisticsView.java
+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/StatisticsView.java
@@ -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$
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java
index 526bc8f145..78be90757c 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java
@@ -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$
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java
index cb32ef5555..1c04319542 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java
@@ -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$
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/experiment/TmfExperiment.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/experiment/TmfExperiment.java
index 0c97bb59d0..5db175de62 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/experiment/TmfExperiment.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/experiment/TmfExperiment.java
@@ -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,8 +928,17 @@ 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
@@ -868,6 +946,11 @@ public class TmfExperiment<T extends TmfEvent> extends TmfEventProvider<T> imple
}
@TmfSignalHandler
+ public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal) {
+ indexExperiment(false, (int) fNbEvents, signal.getRange());
+ }
+
+ @TmfSignalHandler
public void traceUpdated(TmfTraceUpdatedSignal signal) {
for (ITmfTrace<T> trace : fTraces) {
if (trace == signal.getTrace()) {
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java
index fc923b5036..96fe5ec6a6 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java
@@ -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);
+ }
}
}
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java
index 13327067bd..313c8b1193 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java
@@ -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);
+ }
+ }
+ }
+ }
+ }
}
// ------------------------------------------------------------------------
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfSignalManager.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfSignalManager.java
index 46581eb36e..03e6218f56 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfSignalManager.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfSignalManager.java
@@ -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) {
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
index 920bf75a3b..9ab76c4216 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
@@ -73,6 +73,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).
*
* Returns a context which can later be used to read the event.
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
index a81b9c37cf..a558eae126 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
@@ -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();
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomTxtTrace.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomTxtTrace.java
index e4bd564c76..1815155e2b 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomTxtTrace.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomTxtTrace.java
@@ -37,7 +37,8 @@ import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTraceDefinition.Inp
public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {
private static final TmfLocation<Long> NULL_LOCATION = new TmfLocation<Long>((Long) null);
-
+ private static final int CACHE_SIZE = 100;
+
private CustomTxtTraceDefinition fDefinition;
private CustomTxtEventType fEventType;
@@ -52,7 +53,12 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {
fEventType = new CustomTxtEventType(fDefinition);
}
- @Override
+ @Override
+ public void initTrace(String path, Class<CustomTxtEvent> eventType, boolean indexTrace) throws FileNotFoundException {
+ super.initTrace(path, eventType, CACHE_SIZE, indexTrace);
+ }
+
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public ITmfTrace copy() {
// TODO Auto-generated method stub
@@ -61,8 +67,6 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {
@Override
public TmfContext seekLocation(ITmfLocation<?> location) {
- //System.out.println(Thread.currentThread().getName() + "::" + getName() + " seekLocation(" + ((location == null || location.getLocation() == null) ? "null" : location) + ")");
- //new Throwable().printStackTrace();
CustomTxtTraceContext context = new CustomTxtTraceContext(NULL_LOCATION, ITmfContext.INITIAL_RANK);
if (NULL_LOCATION.equals(location) || !new File(getPath()).isFile()) {
return context;
@@ -157,7 +161,6 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {
@Override
public TmfEvent parseEvent(TmfContext tmfContext) {
- //System.out.println(Thread.currentThread().getName() + ":: " + getName() + " parseEvent(" + tmfContext.getRank() + " @ " + (tmfContext.getLocation().getLocation() == null ? "null" : tmfContext.getLocation()));
if (!(tmfContext instanceof CustomTxtTraceContext)) {
return null;
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomXmlTrace.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomXmlTrace.java
index 9f8f2931a9..767ddc0ea6 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomXmlTrace.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomXmlTrace.java
@@ -48,7 +48,8 @@ import org.xml.sax.SAXParseException;
public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {
private static final TmfLocation<Long> NULL_LOCATION = new TmfLocation<Long>((Long) null);
-
+ private static final int CACHE_SIZE = 100;
+
private CustomXmlTraceDefinition fDefinition;
private CustomXmlEventType fEventType;
private InputElement fRecordInputElement;
@@ -67,9 +68,12 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {
}
@Override
+ public void initTrace(String path, Class<CustomXmlEvent> eventType, boolean indexTrace) throws FileNotFoundException {
+ super.initTrace(path, eventType, CACHE_SIZE, indexTrace);
+ }
+
+ @Override
public TmfContext seekLocation(ITmfLocation<?> location) {
- //System.out.println(Thread.currentThread().getName() + "::" + getName() + " seekLocation(" + ((location == null || location.getLocation() == null) ? "null" : location) + ")");
- //new Throwable().printStackTrace();
CustomXmlTraceContext context = new CustomXmlTraceContext(NULL_LOCATION, ITmfContext.INITIAL_RANK);
if (NULL_LOCATION.equals(location) || !new File(getPath()).isFile()) {
return context;
@@ -167,7 +171,6 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {
@Override
public TmfEvent parseEvent(TmfContext tmfContext) {
- //System.out.println(Thread.currentThread().getName() + ":: " + getName() + " parseEvent(" + tmfContext.getRank() + " @ " + (tmfContext.getLocation().getLocation() == null ? "null" : tmfContext.getLocation()));
if (!(tmfContext instanceof CustomXmlTraceContext)) {
return null;
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/handlers/OpenExperimentHandler.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/handlers/OpenExperimentHandler.java
index 7700bad2be..9706752ec3 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/handlers/OpenExperimentHandler.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/handlers/OpenExperimentHandler.java
@@ -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));
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
index 30a4f6ca8c..2e52f9b4bb 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
@@ -53,10 +53,10 @@ import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterAndNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterMatchesNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterNode;
+import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
-import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
-import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentRangeUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfExperimentUpdatedSignal;
import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;
@@ -1541,7 +1541,7 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS
// }
@TmfSignalHandler
- public void experimentUpdated(TmfExperimentRangeUpdatedSignal signal) {
+ public void experimentUpdated(TmfExperimentUpdatedSignal signal) {
if ((signal.getExperiment() != fTrace) || fTable.isDisposed())
return;
// Perform the refresh on the UI thread
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java
index 7845053da1..b6864ca8ab 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java
@@ -35,6 +35,7 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterAndNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterCompareNode;
+import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterCompareNode.Type;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterContainsNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterEqualsNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterEventTypeNode;
@@ -42,15 +43,12 @@ import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterMatchesNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterOrNode;
import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterRootNode;
-import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterCompareNode.Type;
import org.eclipse.linuxtools.tmf.core.util.TmfTraceType;
import org.eclipse.linuxtools.tmf.ui.internal.Messages;
import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTraceDefinition.OutputColumn;
import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtEvent;
-import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTrace;
import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTraceDefinition;
import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomXmlEvent;
-import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomXmlTrace;
import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomXmlTraceDefinition;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
index d03d11b6dc..f5e81fba55 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
@@ -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/lttng/pom.xml b/lttng/pom.xml
index 901696a72e..f4c19b0520 100644
--- a/lttng/pom.xml
+++ b/lttng/pom.xml
@@ -83,7 +83,14 @@
<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>

Back to the top