Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java30
1 files changed, 21 insertions, 9 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java
index 067a4dba05..185d75209a 100644
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java
+++ b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java
@@ -432,20 +432,32 @@ public class XmlTimeGraphView extends AbstractTimeGraphView {
long entryStart = ss.getStartTime();
long entryEnd = ss.getCurrentEndTime();
+
try {
- boolean first = true;
- List<ITmfStateInterval> execNameIntervals = ss.queryHistoryRange(displayQuark, ss.getStartTime(), ss.getCurrentEndTime());
- for (ITmfStateInterval execNameInterval : execNameIntervals) {
+ ITmfStateInterval oneInterval = ss.querySingleState(entryStart, displayQuark);
- if (!execNameInterval.getStateValue().isNull()) {
- if (first) {
- entryStart = execNameInterval.getStartTime();
- first = false;
- }
- entryEnd = execNameInterval.getEndTime();
+ /* The entry start is the first non-null interval */
+ while (oneInterval.getStateValue().isNull()) {
+ long ts = oneInterval.getEndTime() + 1;
+ if (ts > ss.getCurrentEndTime()) {
+ break;
}
+ oneInterval = ss.querySingleState(ts, displayQuark);
}
+ entryStart = oneInterval.getStartTime();
+
+ /* The entry end is the last non-null interval */
+ oneInterval = ss.querySingleState(entryEnd, displayQuark);
+ while (oneInterval.getStateValue().isNull()) {
+ long ts = oneInterval.getStartTime() - 1;
+ if (ts < ss.getStartTime()) {
+ break;
+ }
+ oneInterval = ss.querySingleState(ts, displayQuark);
+ }
+ entryEnd = oneInterval.getEndTime();
+
} catch (AttributeNotFoundException | StateSystemDisposedException e) {
}

Back to the top