import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
-import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
+import org.eclipse.linuxtools.lttng2.kernel.ui.analysis.LttngKernelAnalysisModule;
import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
return retMap;
}
ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
- ITmfStateSystem ssq = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
+ LttngKernelAnalysisModule module = entry.getTrace().getAnalysisModules(LttngKernelAnalysisModule.class).get(LttngKernelAnalysisModule.ID);
+ if (module == null) {
+ return retMap;
+ }
+ ITmfStateSystem ssq = module.getStateSystem();
+ if (ssq == null) {
+ return retMap;
+ }
int tid = entry.getThreadId();
try {
}
}
- } catch (AttributeNotFoundException e) {
- e.printStackTrace();
- } catch (TimeRangeException e) {
- e.printStackTrace();
- } catch (StateValueTypeException e) {
- e.printStackTrace();
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
} catch (StateSystemDisposedException e) {
/* Ignored */
}
retMap.put(Messages.ControlFlowView_attributeSyscallName, state.toString());
}
- } catch (AttributeNotFoundException e) {
- e.printStackTrace();
- } catch (TimeRangeException e) {
- e.printStackTrace();
+ } catch (AttributeNotFoundException | TimeRangeException e) {
+ Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
} catch (StateSystemDisposedException e) {
/* Ignored */
}
return;
}
ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
- ITmfStateSystem ss = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
+ LttngKernelAnalysisModule module = entry.getTrace().getAnalysisModules(LttngKernelAnalysisModule.class).get(LttngKernelAnalysisModule.ID);
+ if (module == null) {
+ return;
+ }
+ ITmfStateSystem ss = module.getStateSystem();
+ if (ss == null) {
+ return;
+ }
int status = ((TimeEvent) event).getValue();
if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL) {
gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
Utils.drawText(gc, state.toString().substring(4), bounds.x, bounds.y - 2, bounds.width, true, true);
}
- } catch (AttributeNotFoundException e) {
- e.printStackTrace();
- } catch (TimeRangeException e) {
- e.printStackTrace();
+ } catch (AttributeNotFoundException | TimeRangeException e) {
+ Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
} catch (StateSystemDisposedException e) {
/* Ignored */
}