aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2012-07-18 11:25:21 -0400
committerPatrick Tasse2012-07-18 11:27:15 -0400
commitd185189b1c712fe22273fca27582c8c2592bff6a (patch)
tree24e8758858adcb6b07af85274451eb9fe443ba9a
parentc42fd3bb6d22b0b6070553c6310e2d9f638848d0 (diff)
downloadorg.eclipse.linuxtools-d185189b1c712fe22273fca27582c8c2592bff6a.tar.gz
org.eclipse.linuxtools-d185189b1c712fe22273fca27582c8c2592bff6a.tar.xz
org.eclipse.linuxtools-d185189b1c712fe22273fca27582c8c2592bff6a.zip
Fix for bug 385419: Streaming issues with legacy LTTng traces.
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java4
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java
index b7ccb1cbbc..f6057d30e0 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java
@@ -207,9 +207,7 @@ public class LTTngTrace extends TmfTrace<LttngEvent> implements ITmfEventParser<
updateJniTrace();
}
};
- synchronized (experiment) {
- experiment.sendRequest(request);
- }
+ experiment.sendRequest(request);
try {
request.waitForCompletion();
} catch (final InterruptedException e) {
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java
index 07ac017010..5c13ebf55a 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java
@@ -461,6 +461,7 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
final Thread thread = new Thread("Streaming Monitor for experiment " + getName()) { //$NON-NLS-1$
private ITmfTimestamp safeTimestamp = null;
+ private ITmfTimestamp lastSafeTimestamp = null;
private TmfTimeRange timeRange = null;
@Override
@@ -477,8 +478,9 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
endTimestamp = trace.getEndTime();
}
}
- if (safeTimestamp != null && safeTimestamp.compareTo(getTimeRange().getEndTime(), false) > 0) {
+ if (safeTimestamp != null && (lastSafeTimestamp == null || safeTimestamp.compareTo(lastSafeTimestamp, false) > 0)) {
timeRange = new TmfTimeRange(startTimestamp, safeTimestamp);
+ lastSafeTimestamp = safeTimestamp;
} else {
timeRange = null;
}