Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Khouzam2018-03-27 14:35:55 -0400
committerMatthew Khouzam2018-03-27 14:57:17 -0400
commitbec1162006fc433a1d0b97436a99e13f3ab4aff6 (patch)
treec836e70b500773ac9c5270d59576e9ddc1719c52
parentf47b970a5c3e440df541d696b1c6b18d004b6e28 (diff)
downloadorg.eclipse.tracecompass.incubator-bec1162006fc433a1d0b97436a99e13f3ab4aff6.tar.gz
org.eclipse.tracecompass.incubator-bec1162006fc433a1d0b97436a99e13f3ab4aff6.tar.xz
org.eclipse.tracecompass.incubator-bec1162006fc433a1d0b97436a99e13f3ab4aff6.zip
callstack: no longer throw exceptions when selecting negative time.
Change-Id: I34b89a163c60fa724f9b92043bab0d1e95f3acac Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-on: https://git.eclipse.org/r/120297 Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com> Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com> Tested-by: CI Bot
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/CallGraphAnalysis.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/CallGraphAnalysis.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/CallGraphAnalysis.java
index c08f488a..d1cc5648 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/CallGraphAnalysis.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/CallGraphAnalysis.java
@@ -140,7 +140,11 @@ public class CallGraphAnalysis extends TmfAbstractAnalysisModule implements ICal
IHostModel model = ModelManager.getModelFor(callstackModule.getHostId());
for (CallStackSeries callstack : callstackModule.getCallStackSeries()) {
- if (!iterateOverCallstackSerie(callstack, model, callgraph, range.getStartTime().toNanos(), range.getEndTime().toNanos(), monitor)) {
+ long time0 = range.getStartTime().toNanos();
+ long time1 = range.getEndTime().toNanos();
+ long start = Math.min(time0, time1);
+ long end = Math.max(time0, time1);
+ if (!iterateOverCallstackSerie(callstack, model, callgraph, start, end, monitor)) {
return false;
}
}

Back to the top