Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Khouzam2019-07-31 15:05:47 -0400
committerMatthew Khouzam2019-08-01 09:35:16 -0400
commit24a162268ab467a45e4d51663ef200d7f430a720 (patch)
tree8af592c64f9429f64fdc2d73f01ee8f6a8980a6f
parent308dd254befc1a772c1d7d20682e30700016ca6d (diff)
downloadorg.eclipse.tracecompass.incubator-24a162268ab467a45e4d51663ef200d7f430a720.tar.gz
org.eclipse.tracecompass.incubator-24a162268ab467a45e4d51663ef200d7f430a720.tar.xz
org.eclipse.tracecompass.incubator-24a162268ab467a45e4d51663ef200d7f430a720.zip
callstack: Only write log error once in the case of lost events
[Fixed] Only log first lost event callstack error. Change-Id: Icff9052a1719c1fe949fd18ce58718e08b57b6d4 Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-on: https://git.eclipse.org/r/146885 Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net> Tested-by: CI Bot
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java
index 835e492f..36064cec 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java
@@ -21,7 +21,6 @@ import org.eclipse.tracecompass.incubator.analysis.core.aspects.ThreadNameAspect
import org.eclipse.tracecompass.incubator.callstack.core.flamechart.Messages;
import org.eclipse.tracecompass.incubator.internal.callstack.core.Activator;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.statesystem.AbstractTmfStateProvider;
@@ -109,6 +108,8 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
/** CallStack state system ID */
private static final String ID = "org.eclipse.linuxtools.tmf.callstack"; //$NON-NLS-1$
+ private boolean fHasErrors = false;
+
/**
* Default constructor
*
@@ -175,17 +176,18 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
threadName = Long.toString(getThreadId(event));
}
int quark = ss.getQuarkAbsoluteAndAdd(PROCESSES, processName, threadName, InstrumentedCallStackAnalysis.CALL_STACK);
- ITmfStateValue poppedValue = ss.popAttribute(timestamp, quark);
+ Object poppedValue = ss.popAttributeObject(timestamp, quark);
/*
* Verify that the value we are popping matches the one in the
* event field, unless the latter is undefined.
*/
- if (!functionExitState.equals(poppedValue)) {
+ if (!fHasErrors && !functionExitState.equals(poppedValue)) {
Activator.getInstance().logWarning(NLS.bind(Messages.CallStackStateProvider_EventDescription, event.getName(),
- event.getTimestamp().getValue()) + ": " + NLS.bind( //$NON-NLS-1$
- Messages.CallStackStateProvider_UnmatchedPoppedValue,
- functionExitState,
- poppedValue));
+ event.getTimestamp().getValue()) + ": " //$NON-NLS-1$
+ + NLS.bind( Messages.CallStackStateProvider_UnmatchedPoppedValue,
+ functionExitState,
+ poppedValue));
+ fHasErrors = true;
}
}
}

Back to the top