package org.eclipse.linuxtools.lttng.ui.model.trange;
-import org.eclipse.linuxtools.lttng.state.StateStrings;
-import org.eclipse.linuxtools.lttng.state.model.LttngIRQState;
-import org.eclipse.linuxtools.lttng.state.model.LttngTraceState;
-import org.eclipse.linuxtools.lttng.state.model.LttngTrapState;
+import org.eclipse.linuxtools.lttng.core.state.StateStrings;
+import org.eclipse.linuxtools.lttng.core.state.model.LTTngCPUState;
+import org.eclipse.linuxtools.lttng.core.state.model.LttngIRQState;
+import org.eclipse.linuxtools.lttng.core.state.model.LttngTraceState;
+import org.eclipse.linuxtools.lttng.core.state.model.LttngTrapState;
import org.eclipse.linuxtools.lttng.ui.model.trange.TimeRangeEventResource.ResourceTypes;
/**
public String getStateMode(LttngTraceState traceSt) {
LttngIRQState irqState = traceSt.getIrq_states().get(
getResourceId());
- String statemode = "";
+ String statemode = ""; //$NON-NLS-1$
if (irqState != null) {
statemode = irqState.peekFromIrqStack().getInName();
}
@Override
public String getStateMode(LttngTraceState traceSt) {
// Determine the trap state.
- String trapStateMode = "";
+ String trapStateMode = ""; //$NON-NLS-1$
LttngTrapState ts = traceSt.getTrap_states().get(getResourceId());
// *** Note :
@Override
public String getStateMode(LttngTraceState traceSt) {
// Get the resource state mode
- String cpuStateMode = traceSt.getCpu_states().get(
- getResourceId())
- .peekFromCpuStack().getInName();
+ LTTngCPUState cpuState = traceSt.getCpu_states().get(
+ getResourceId());
+
+ String cpuStateMode = ""; //$NON-NLS-1$
+ if (cpuState != null) {
+ cpuStateMode = traceSt.getCpu_states().get(
+ getResourceId())
+ .peekFromCpuStack().getInName();
+ }
return cpuStateMode;
}